. . "2017-06-13T06:01:31Z" . . . . . . . "VAL_SpongerACLs" . . . "VAL_SpongerACLs" . . "VAL_SpongerACLs" . "2017-06-13T06:01:31.589053"^^ . "2017-06-13T06:01:31.589053"^^ . . "38adfe98679ccaa094ef4a2cd35d934f" . . . . . . "%META:TOPICPARENT{name=\"ValQuickStartGuide\"}%\n\n---+ Sponger ACL Rules\n\n%TOC%\n\n\n---++ Introduction\n\nThe Virtuoso Sponger can be controlled via ACLs (Access Control Lists); basically, rules which define who is \nallowed to Sponge and who is not. It is also possible to restrict use of particular Sponger Cartridges. The \nACL system is optional, and is enabled using a SPARQL pragma and the ACL Scope system as described below.\n\n---++ACL Checking Layers\n\nThe Sponger can be accessed via several routes. These are depicted below. Sponging is provided as an optional service utilized by other service endpoints layered on top. For sponging to occur, the service layers above the Sponger, and also the graph security settings (both enforced by VAL and the RDF Graph Security System), must all grant sponge permission.\n\n\n\nHaving sponge permission means that sponging might occur (i.e. sponge attempts will not be blocked by VAL); it doesn't guarantee that sponging will occur. Whether sponging is done depends on whether the Sponger cache for the target data source URI is stale (as determined by the Sponger cache invalidation rules) and whether a re-sponge is forced through a Sponger option (the re-sponge option depends on which service is used to invoke sponging: /about, /describe or SPARQL).\n\n---++Scopes Applicable to the Sponger\n\nTwo scopes control access to the Sponger:\n * oplacl:Query\n * Controls access to the Sponger in general and whether a user is able to sponge at all\n * oplacl:SpongerCartridges\n * Restricts access to particular Sponger cartridges\n\n---+++ Enabling ACLs for General Sponger Use\n\nBy default, Sponger ACLs are disabled in all realms. (See also \n[[http://docs.openlinksw.com/val/val_acl.html#val_acl_rule_scopes][ACL Scopes in VAL]].)\n\n\nTo enable evaluation of SPARQL ACL rules in the default realm (which includes services /sparql, /describe and /about, all of which support sponging) to determine whether the user may Sponge, enable the [[http://www.openlinksw.com/c/9D2L64WF][oplacl:Query]] scope. This can be done through the Conductor UI or by executing the following SPARQL:\n\n\nSPARQL\nPREFIX oplacl: \n WITH \n DELETE \n { oplacl:DefaultRealm oplacl:hasDisabledAclScope oplacl:Query }\n INSERT\n { oplacl:DefaultRealm oplacl:hasEnabledAclScope oplacl:Query }\n;\n\n\nSPARQL ACLs refer to ACLs which regulate who has which SPARQL permissions (Read, Update, Sponge, List).\n\n---+++ Enabling ACLs for Cartridge-Specific Control\n\nBy default, as with generic Sponger ACLs, Cartridge ACLs are disabled in all realms. (See also \n[[http://docs.openlinksw.com/val/val_acl.html#val_acl_rule_scopes][ACL Scopes in VAL]].) \n\nTo enable evaluation of ACL rules in the default realm (which includes /sparql and /sponger, \namong others) for determination of whether the user may Sponge with a particular cartridge, execute the following SPARQL:\n\n\nSPARQL\nPREFIX oplacl: \n WITH \n DELETE\n { oplacl:DefaultRealm oplacl:hasDisabledAclScope oplacl:SpongerCartridges }\n INSERT\n { oplacl:DefaultRealm oplacl:hasEnabledAclScope oplacl:SpongerCartridges }\n;\n\n\nNext, enable cartridge ACLs using the Conductor UI. To do so, navigate to the Sponger's 'Configuration' panel under the 'Linked Data' > 'Sponger' tabs, then select 'ABAC' as the cartridge ACL mode.\n\n\n
Cartridge ACL mode selection in Conductor
\n\nNote:\n * Virtuoso supports two types of cartridge ACLs for protecting access to Sponger cartridges - ABAC and RBAC ACLs. ABAC cartridge ACLs are VAL-based, and configured and managed through VAL. RBAC cartridge ACLs are SQL-role-based, and are configured and managed through the Conductor UI's 'Access Control List' panel accessible from the 'Linked Data' > 'Access Control' tab.\n * In the Configuration panel, option 'ABAC' is disabled if the VAL VAD isn't installed. 'None' results in no cartridge ACLs of either type being applied. If option 'ABAC' is selected, scope oplacl:SpongerCartridges must be enabled for VAL cartridge ACLs to take effect.\n * When the Cartridges VAD is first installed, the cartridge ACL mode is initialized to 'ABAC' if the VAL VAD is present, or 'None' otherwise. Once initialized, any cartridge ACL mode subsequently set through the Conductor UI remains in effect. If the VAL VAD is uninstalled and the cartridge ACL mode is 'ABAC', the mode is reset to 'None'.\n\n\n---++ Usage\n\nBefore using the ACL engine, it is important to load the Openlink ACL Ontology into the VAL ACL Schema graph:\n\n\nSPARQL\n LOAD \n INTO \n;\n\n\nFor Sponger ACL rules to be enforced by the SPARQL engine, the \"get:enforce-acls\" pragma must \nbe set. When VAL is installed, /sparql will do this automatically:\n\n\nSPARQL \n DEFINE get:enforce-acls \"yes\" \n SELECT ....\n\n\n\nThe Rules can be controlled via the [[http://docs.openlinksw.com/val/group__val__acl__module__http__api.html][RESTful VAL ACL API]] \nor the [[http://docs.openlinksw.com/val/group__val__acl__module__internal__api.html#ga89b2c77c10c82186ddc0e7b46093123c][Internal VAL API]]. \nAlternatively, one can explicitly add the rules to the private graph matching the realm in which the rules should apply. Given the default realm --\n\nhttp://www.openlinksw.com/ontology/acl#DefaultRealm\n\n-- and default hostname \"HOST\" the graph IRI would be --\n\nhttp://HOST/acl/graph/rules/http%3A%2F%2Fwww.openlinksw.com%2Fontology%2Facl%23DefaultRealm\n\n-- and the groups will be stored in named graph --\n\nhttp://HOST/acl/graph/groups/http%3A%2F%2Fwww.openlinksw.com%2Fontology%2Facl%23DefaultRealm\n\n \nBe aware that [[http://docs.openlinksw.com/val/val_configuration.html#val_configuration_acl_graphs][these graphs can be customized]] \nfor better readability.\n\n\n---+++ ACL Resources\n\n---++++ Generic Sponger ACL Resource\n\nTo grant the right to Sponge in general, there is only one resource of importance: urn:virtuoso:access:sparql. \nWhoever has oplacl:Sponge permissions on this virtual resource can sponge in the given realm. \n(See [[VAL_SparqlACLs][SPARQL and named graph ACLs]] for details).\n\n---++++ Sponger Cartridge ACLs\n\nEach Cartridge is described as an RDF resource, and has a URI uniquely identifying it. These URIs must be used in ACL rules \ngoverning the use of that specific cartridge. As with generic Sponger access, the access mode is oplacl:Sponge.\n\nTo date, Sponger cartridge URIs are built from a common prefix, http://data.openlinksw.com/oplweb/component/xc_, \nplus the lowercase internal name of the cartridge. For example, the Wine cartridge has URI http://data.openlinksw.com/oplweb/component/xc_wine. Graph <urn:virtuoso:sponger:cartridges> contains the full list of cartridge URIs.\n\nThere is one special URI, which denotes all installed cartridges in a given Virtuoso instance: http://data.openlinksw.com/oplweb/component/xc_all.\n\nBe aware that [[http://docs.openlinksw.com/val/val_configuration.html#val_configuration_acl_graphs][the ACL graphs can be customized]] for better readability.\n\n\n---++ Sponger ACL Rule Examples\n\nIn the following examples --\n\n * The default realm [[http://www.openlinksw.com/ontology/acl#DefaultRealm][oplacl:DefaultRealm]] is used for creating the ACL resources.\n\n * \"HOST\" is used as a placeholder for the default hostname of the system the ACL resource are created on.\n\n\n---+++ Generic Sponging ACL Examples \n\nSee [[VAL_SparqlACLs][SPARQL and named graph ACLs]] for more examples.\n\n---++++ Allow everyone to sponge\n\n\nSPARQL\nPREFIX acl: \nPREFIX oplacl: \nPREFIX foaf: \n WITH \n INSERT \n {\n <#a1> a acl:Authorization ;\n foaf:maker ; \n oplacl:hasAccessMode oplacl:Sponge ;\n acl:accessTo ;\n acl:agentClass foaf:Agent ;\n oplacl:hasScope oplacl:Query ;\n oplacl:hasRealm oplacl:DefaultRealm \n };\n\n\n---++++ Allow user \"demo\" to grant Sponging permissions\n\nBy default, only \"dba\" and administrators can grant sponging permissions. When this rule in in place, user \"demo\" can create additional ACL rules granting sponging permissions to others. \n\nSPARQL\nPREFIX acl: \nPREFIX oplacl: \nPREFIX foaf: \n WITH \n INSERT\n {\n <#a1> a acl:Authorization ;\n foaf:maker <{ADMIN-IRI}> ;\n oplacl:hasAccessMode oplacl:GrantSponge ;\n acl:accessTo ;\n acl:agent ;\n oplacl:hasScope oplacl:Query ;\n oplacl:hasRealm oplacl:DefaultRealm .\n };\n\n\n\n---++++ Grant Sponge Permissions to a Group Of People\n\nThere are two types of groups: \n * static -- a simple list of individuals\n * conditional -- a set of conditions which define a dynamic group of individuals\n\nThe rule to grant Sponge permissions to a group looks exactly like the one for granting permissions to an individual:\n\nSPARQL\nPREFIX acl: \nPREFIX oplacl: \nPREFIX foaf: \n WITH \n INSERT\n {\n <#a1> a acl:Authorization ;\n foaf:maker <{ADMIN-IRI}> ;\n oplacl:hasAccessMode oplacl:Sponge ;\n acl:accessTo ;\n acl:agent <#group> ;\n oplacl:hasScope oplacl:Query ;\n oplacl:hasRealm oplacl:DefaultRealm .\n };\n\n\n---+++++ Grant Sponge Permissions to a Static Group\n\n\nSPARQL\nPREFIX oplacl: \nPREFIX foaf: \n WITH \n INSERT\n {\n <#group> a foaf:Group, \n oplacl:StaticGroup ;\n foaf:name \"Some people\" ;\n foaf:member ,\n .\n };\n\n\n\n---+++++ Grant Sponge Permissions to Anyone Who Is Authenticated\n\nThe Required Group in a [[http://docs.openlinksw.com/val/val_acl.html#val_acl_groups_conditional][conditional group]] which includes every authenticated NetID:\n\nSPARQL\nPREFIX oplacl: \nPREFIX foaf: \n WITH \n INSERT\n {\n <#group> a foaf:Group , \n oplacl:ConditionalGroup ;\n foaf:name \"Valid Identifiers\" ;\n oplacl:hasCondition [\n a oplacl:GroupCondition , \n oplacl:GenericCondition ;\n oplacl:hasCriteria oplacl:NetID ;\n oplacl:hasComparator oplacl:IsNotNull ;\n oplacl:hasValue 1\n ] \n };\n\n\n\n---+++++ Grant Sponge Permissions to any Verified WebID\n\nThe Required Group in a [[http://docs.openlinksw.com/val/val_acl.html#val_acl_groups_conditional][conditional group]] which includes every authenticated NetID:\n\nSPARQL\nPREFIX oplacl: \nPREFIX foaf: \n WITH \n INSERT\n {\n <#group> a foaf:Group , \n oplacl:ConditionalGroup ;\n foaf:name \"Valid WebIDs\" ;\n oplacl:hasCondition [\n a oplacl:GroupCondition, \n oplacl:GenericCondition ;\n oplacl:hasCriteria oplacl:WebIDVerified ;\n oplacl:hasComparator oplacl:EqualTo ;\n oplacl:hasValue 1\n ] \n };\n\n\n---+++++ Grant Sponge Permissions to any Valid X.509 Client Certificate\n\nThe Required Group in a [[http://docs.openlinksw.com/val/val_acl.html#val_acl_groups_conditional][conditional group]] which includes every valid X.509 certificate:\n\nSPARQL\nPREFIX oplacl: \nPREFIX foaf: \n WITH \n INSERT\n {\n <#group> a foaf:Group, \n oplacl:ConditionalGroup ;\n foaf:name \"Valid X.509 Certificates\" ;\n oplacl:hasCondition [\n a oplacl:GroupCondition, \n oplacl:GenericCondition ;\n oplacl:hasCriteria oplacl:CertVerified ;\n oplacl:hasComparator oplacl:EqualTo ;\n oplacl:hasValue 1\n ] \n };\n\n\n---+++++ Grant Sponge Permissions to any Verified WebID Which Claims to be a Person\n\nQuery conditions consist of a query which supports two variables which are replaced with the profile graph and the personal URI respectively.\n\nSPARQL\nPREFIX oplacl: \nPREFIX foaf: \n WITH \n INSERT\n {\n <#group> a foaf:Group, oplacl:ConditionalGroup ;\n foaf:name \"Valid WebIDs\" ;\n oplacl:hasCondition [\n a oplacl:GroupCondition, \n oplacl:GenericCondition ;\n oplacl:hasCriteria oplacl:WebIDVerified ;\n oplacl:hasComparator oplacl:EqualTo ;\n oplacl:hasValue 1\n ] ,\n [\n a oplacl:GroupCondition, \n oplacl:QueryCondition ;\n oplacl:hasQuery \"\"\"ASK WHERE { GRAPH ^{graph}^ { ^{uri}^ a foaf:Person } }\"\"\"\n ]\n };\n\n\n---+++ Cartridge-Specific ACL Examples\n\n---++++ Grant the Right to Use a Specific Cartridge to Everyone\n\nEveryone is allowed to Sponge using the Facebook Graph Cartridge:\n\nSPARQL\nPREFIX acl: \nPREFIX oplacl: \nPREFIX foaf: \n WITH \n INSERT\n {\n <#a1> a acl:Authorization ;\n foaf:maker <{ADMIN-IRI}> ;\n oplacl:hasAccessMode oplacl:Sponge ;\n acl:accessTo ;\n acl:agentClass foaf:Agent ;\n oplacl:hasScope oplacl:SpongerCartridges ;\n oplacl:hasRealm oplacl:DefaultRealm \n };\n\n\n\n\n---++ See Also\n * [[VAL_SparqlACLs][SPARQL and named graph ACLs]]\n * [[http://docs.openlinksw.com/val/val_acl.html][VAL ACL System]]" . . . . . . . . "2017-06-13T06:01:31Z" . . .