Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-hoailona
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-hoailona
Commits
084bc7db
Commit
084bc7db
authored
Dec 07, 2018
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update/fix documentation
parent
8e227aab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
45 deletions
+66
-45
README.rst
README.rst
+66
-45
No files found.
README.rst
View file @
084bc7db
...
...
@@ -21,7 +21,27 @@ Akamai SecureHD Token Authorization VMOD
SYNOPSIS
========
import hoailona [from "path"] ;
::
import hoailona [from "path"] ;
new xpolicy = hoailona.policy(ENUM type, DURATION ttl, STRING description, BLOB secret, INT start_offset)
new xhosts = hoailona.hosts()
VOID xhosts.add(STRING host, STRING policy, STRING path, STRING description)
INT xhosts.policy(STRING host, STRING path)
STRING xhosts.token(STRING acl, DURATION ttl, STRING data)
BLOB xhosts.secret()
STRING xhosts.explain()
STRING version()
::
...
...
@@ -73,7 +93,7 @@ does provide the means to associate shared secrets with a policy,
which can be used together with a VMOD that does compute HMACs (such
as the ``blobdigest`` VMOD, see `SEE ALSO`_).
The name of the VMOD is inspired by the Hawaiian word *h
ō
`ailona*, for
The name of the VMOD is inspired by the Hawaiian word *h
o
`ailona*, for
"sign" or "symbol" (pronounced "ho-eye-lona"), which we believe to be
a suitable translation for "token". We welcome feedback from speakers
of Hawaiian about the choice of the name.
...
...
@@ -226,21 +246,21 @@ subroutines, subsequent calls to ``.token()`` and ``.secret()`` in the
same backend transaction are based on the policy that was determined
by that call.
CONTENTS
========
* policy(ENUM {OPEN,DENY,TOKEN}, DURATION, STRING, BLOB, INT)
* hosts()
* STRING version()
.. _obj_policy:
policy
------
policy
(...)
------
-----
::
new OBJ = policy(ENUM {OPEN,DENY,TOKEN} type, DURATION ttl=0, STRING description=0, BLOB secret=0, INT start_offset=0)
new xpolicy = hoailona.policy(
ENUM {OPEN, DENY, TOKEN} type,
DURATION ttl=0,
STRING description=0,
BLOB secret=0,
INT start_offset=0
)
Create a policy. The ``type`` enum is required, to classify the policy
as ``OPEN``, ``DENY`` or ``TOKEN``.
...
...
@@ -295,14 +315,13 @@ Examples::
# A policy for "access denied"
new forbid = hoailona.policy(DENY, description="access denied");
.. _obj_hosts:
hosts
-----
::
new OBJ = hosts()
.. _obj_hosts:
new xhosts = hoailona.hosts()
-----------------------------
Create a ``hosts`` object, which provides a store for a configuration
that associates with policies with hostnames, and optionally with
...
...
@@ -311,12 +330,17 @@ becomes useful by calling the ``.add()`` method.
.. _func_hosts.add:
hosts.add
---------
hosts.add
(...)
---------
-----
::
VOID hosts.add(STRING host, STRING policy, STRING path=0, STRING description=0)
VOID xhosts.add(
STRING host,
STRING policy,
STRING path=0,
STRING description=0
)
Associate ``policy`` with the ``host``, optionally restricted to the
path pattern described by ``path``. The ``host`` and ``policy``
...
...
@@ -449,14 +473,11 @@ Examples::
h.add("evil.org", "deny", description="no access to evil.org");
}
.. _func_hosts.policy:
hosts.policy
------------
:
:
.. _func_hosts.policy
:
INT hosts.policy(STRING host=0, STRING path=0)
INT xhosts.policy(STRING host=0, STRING path=0)
-----------------------------------------------
Determine the policy type that holds for ``host`` and ``path``. The
return values are:
...
...
@@ -520,14 +541,19 @@ with parameters.
Calling ``.policy()`` with only one of the ``host`` and ``path``
parameters empty is an error.
.. _func_hosts.token:
hosts.token
-----------
STRING xhosts.token(STRING acl, DURATION ttl, STRING data)
-----------
-----------------------------------------------
::
STRING hosts.token(STRING acl=0, DURATION ttl=0, STRING data=0)
STRING xhosts.token(
STRING acl=0,
DURATION ttl=0,
STRING data=0
)
If the previous invocation of ``.policy()`` determined policy type
``TOKEN`` (return value 2 from ``.policy()``), then return the
...
...
@@ -577,14 +603,11 @@ Examples::
# needed for SecureHD authorization.
}
.. _func_hosts.secret:
hosts.secret
------------
::
.. _func_hosts.secret:
BLOB hosts.secret()
BLOB xhosts.secret()
--------------------
Return the shared secret stored for the policy determined by the
previous invocation of ``.policy()``. Returns NULL if no such shared
...
...
@@ -624,14 +647,11 @@ Examples::
}
}
.. _func_hosts.explain:
hosts.explain
-------------
::
.. _func_hosts.explain:
STRING hosts.explain()
STRING xhosts.explain()
-----------------------
Returns a string describing the policy that was determined for a host
and path by the most recent invocation of ``.policy()`` in the current
...
...
@@ -662,14 +682,14 @@ Example::
std.log("Policy determination: " + config.explain());
}
.. _func_version:
version
-------
::
STRING version()
.. _func_version:
STRING version()
----------------
Returns the version string for this VMOD.
...
...
@@ -748,6 +768,7 @@ Users of the Luna Control Center can consult:
* https://control.akamai.com/dl/customers/SPE/EdgeAuth-latest.zip
COPYRIGHT
=========
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment