VAL
Virtuoso Authentication Layer
Package DB.DBA

Functions

 DBEV_ACLS_ENABLED_FOR_SCOPE (varchar scope, varchar realm)
 
 DBEV_CHECK_CONNECTION_AUTHENTICATION (varchar uname)
 Virtuoso callback for internal authentication. More...
 
 DBEV_CHECK_CONNECTION_AUTHENTICATION_2 (varchar uname, varchar agentIri, varchar realm=null)
 Virtuoso callback for internal authentication. More...
 
 DBEV_CHECK_PERMISSIONS (varchar resource, varchar scope, varchar clientIp=null, varchar agentIri=null, varchar realm=null)
 Virtuoso callback for internal ACLs. More...
 
 DBEV_GET_CONNECTION_RESTRICTION (varchar resource, varchar parameter=null, decimal minValue, varchar minServiceId, decimal maxValue, varchar maxServiceId, varchar agentIri=null, varchar realm=null)
 Virtuoso Hook proc: Get the min and max values of one restriction. More...
 
 DBEV_RES_CREATION_POST (varchar uri, varchar scope, varchar realm=null)
 
 DBEV_RESTRICTIONS (any keys, varchar agentIri=null, varchar realm=null)
 Virtuoso callback for internal restrictions. More...
 

Function Documentation

◆ DBEV_ACLS_ENABLED_FOR_SCOPE()

DB.DBA.DBEV_ACLS_ENABLED_FOR_SCOPE ( varchar  scope,
varchar  realm 
)

◆ DBEV_CHECK_CONNECTION_AUTHENTICATION()

DB.DBA.DBEV_CHECK_CONNECTION_AUTHENTICATION ( varchar  uname)

Virtuoso callback for internal authentication.

Deprecated:
Use DB.DBA.DBEV_CHECK_CONNECTION_AUTHENTICATION_2() instead.

◆ DBEV_CHECK_CONNECTION_AUTHENTICATION_2()

DB.DBA.DBEV_CHECK_CONNECTION_AUTHENTICATION_2 ( varchar  uname,
varchar  agentIri,
varchar  realm = null 
)

Virtuoso callback for internal authentication.

Virtuoso for example uses this procedure to check external authentication in the DAV layer. This procedure simply checks if any of the VAL-supported auth information is available. If so, it will return 1 and set uname to the authenticated SQL user if and only if the authentication information could be mapped to such a user.

Since VAL also supports authentication via 3rd-party accounts that are not connected to any SQL user this procedure can also return 1 but leave uname to null.

See also
DB.DBA.DBEV_CHECK_PERMISSIONS()

◆ DBEV_CHECK_PERMISSIONS()

DB.DBA.DBEV_CHECK_PERMISSIONS ( varchar  resource,
varchar  scope,
varchar  clientIp = null,
varchar  agentIri = null,
varchar  realm = null 
)

Virtuoso callback for internal ACLs.

Returns
A vector of access mode IRIs applicable to the authenticated user or anyone if there is no authentication information.
See also
DB.DBA.DBEV_CHECK_CONNECTION_AUTHENTICATION()

◆ DBEV_GET_CONNECTION_RESTRICTION()

DB.DBA.DBEV_GET_CONNECTION_RESTRICTION ( varchar  resource,
varchar  parameter = null,
decimal  minValue,
varchar  minServiceId,
decimal  maxValue,
varchar  maxServiceId,
varchar  agentIri = null,
varchar  realm = null 
)

Virtuoso Hook proc: Get the min and max values of one restriction.

Virtuoso allows the creation of procedure DB.DBA.DBEV_GET_CONNECTION_RESTRICTION to allow Virtuoso use of our restrictions engine.

Parameters
resourceThe resource for which a restriction should be checked.
parameterThe optional parameter which allows to split one resource into several restrictions.
[out]minValueWill be set to the min value of the restriction of null if no matching restriction had a min value.
minServiceIdWill be set to the service ID of the authenticated person which triggered the minimum restriction. If the restriction is based on an IP address then it will be null.
[out]maxValueWill be set to the max value of the restriction of null if no matching restriction had a max value.
maxServiceIdWill be set to the service ID of the authenticated person which triggered the maximum restriction. If the restriction is based on an IP address then it will be null.
agentIriThe optional IRI of the authenticated agent. If omitted VAL authentcation will be checked.
realmThe optional application realm which falls back to VAL.DBA.get_default_realm().
Returns
1 if restriction values have been found, 0 otherwise.
See also
DB.DBA.DBEV_RESTRICTIONS()

◆ DBEV_RES_CREATION_POST()

DB.DBA.DBEV_RES_CREATION_POST ( varchar  uri,
varchar  scope,
varchar  realm = null 
)

Post-resource creation hook.

Once new resources have been created (typically DAV resources) via non-sql account authentication we need to create ACL rules to grant the authenticated person access to the newly created resource.

This is done in this hook.

◆ DBEV_RESTRICTIONS()

DB.DBA.DBEV_RESTRICTIONS ( any  keys,
varchar  agentIri = null,
varchar  realm = null 
)

Virtuoso callback for internal restrictions.

This callback can be used by Virtuoso to apply restrictions to any internal system. It is for example used by the HTTP engine to restrict the request rate or the max result content size.

Parameters
keysA vector which contains a map of restriction names to their type, ie. min or max. The restriction names will be prefixed with urn:virtuoso:restrictions: which is important when declaring the restriction rules.
agentIriThe optional IRI of the authenticated agent. If omitted VAL authentcation will be checked.
realmThe optional application realm which falls back to VAL.DBA.get_default_realm().
Returns
A vector which contains a map of restriction names to a vector of restriction type (max or min), the restriction value, and an optional serviceId of the authenticated person which triggered the restriction. If the latter is null then the restriction is assumed to be on an IP address level.
See also
DB.DBA.DBEV_GET_CONNECTION_RESTRICTION()