blob: a102b9dc134c1b09424211be3409471747d85995 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>Overview (Apache Jena - Security Permissions 5.0.0)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="package index">
<meta name="generator" content="javadoc/PackageIndexWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
</head>
<body class="package-index-page">
<script type="text/javascript">var pathtoroot = "./";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li class="nav-bar-cell1-rev">Overview</li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html#overview">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<div class="header">
<h1 class="title">Apache Jena - Security Permissions 5.0.0</h1>
</div>
<div class="block"><p>JenaSecurity is a SecurityEvaluator interface and a set of
dynamic proxies that apply that interface to Jena Graphs, Models, and
associated methods and classes.</p>
<p>
The SecurityEvaluator class must be implemented. This class provides
the interface to the authentication results (e.g.
<code>getPrincipal()</code>
) and the authorization system.
<ul>
<li>Create a SecuredGraph by calling <code>Factory.getInstance(
SecurityEvaluator, String, Graph );</code>
</li>
<li>Create a SecuredModel by calling <code>Factory.getInstance(
SecurityEvaluator, String, Model )</code>
</li>
<li>It is not recommended that you use the Jena <code>ModelFactory.createModelForGraph(
SecuredGraph )</code> See Differences Between Graph and Model below for
reasons.
</li>
</ul>
<ul>
<li>See SecurityEvaluator documentation for description of
cascading security checks</li>
<li>Secured methods are annotated with: &#64;sec.graph for
permissions required on the graph to execute the method.
&#64;sec.triple for permissions required on the associated triples
(if any) to execute the method.</li>
<li>It is possible to implement a SecurityEvaluator that does not
enforce security at the triple level. See SecurityEvaluator
documentation for details</li>
</ul>
<h2>
Differences Between
<code>Graph</code>
and
<code>Model</code>
</h2>
<p>
The Graph interface does not have the concept of "update". Thus all
updates are implemented as a delete and an insert. The Model interface
does have the concept of update as evidenced by the
<code>replace()</code>
method in the
<code>RDFList</code>
class. This difference means that a
<code>Model</code>
created by calling
<code>ModelFactory.createModelForGraph( SecuredGraph )</code>
will yield a model that evaluates
<code>Update</code>
actions differently from one created with
<Code>Factory.getInstance( SecurityEvaluator, modelIRI, model)</Code>
.
<ul>
<li>Models created by the Jena ModelFactory will require that the
user have both delete and create permissions on the underlying graph
to perform the update. And will delete the existing triple before
attempting to create the new one. Since the graph interface does not
have visibility to the model's request for update these are, to the
graph, separate events. It is possible that the delete may succeed
while the create fails.</li>
<li>Models created by the JenaSecurity Factory will require that
the user have update permissions on the underlying model to perform
the update. As long as the user has the update permission on the
graph, and the triple where required, the update is performed as a
single event.</li>
</ul>
<p>
This is the well documented case of differences between the two secured
model creation methods. For this reason it is recommended that the
model be created with the
<code>Factory.getInsance()</code>
method.
</p></div>
<div id="all-packages-table">
<div class="caption"><span>Packages</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Package</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color all-packages-table all-packages-table-tab1"><a href="org/apache/jena/permissions/package-summary.html">org.apache.jena.permissions</a></div>
<div class="col-last even-row-color all-packages-table all-packages-table-tab1">
<div class="block">JenaSecurity is a SecurityEvaluator interface and a set of dynamic proxies that
apply that interface to Jena Graphs, Models, and associated methods and classes.</div>
</div>
<div class="col-first odd-row-color all-packages-table all-packages-table-tab1"><a href="org/apache/jena/permissions/example/package-summary.html">org.apache.jena.permissions.example</a></div>
<div class="col-last odd-row-color all-packages-table all-packages-table-tab1">&nbsp;</div>
<div class="col-first even-row-color all-packages-table all-packages-table-tab1"><a href="org/apache/jena/permissions/example/readonly/package-summary.html">org.apache.jena.permissions.example.readonly</a></div>
<div class="col-last even-row-color all-packages-table all-packages-table-tab1">
<div class="block">Example code for creating a read only model/graph</div>
</div>
<div class="col-first odd-row-color all-packages-table all-packages-table-tab1"><a href="org/apache/jena/permissions/graph/package-summary.html">org.apache.jena.permissions.graph</a></div>
<div class="col-last odd-row-color all-packages-table all-packages-table-tab1">
<div class="block">Secured implementation of the Graph interface and associated classes.</div>
</div>
<div class="col-first even-row-color all-packages-table all-packages-table-tab1"><a href="org/apache/jena/permissions/graph/impl/package-summary.html">org.apache.jena.permissions.graph.impl</a></div>
<div class="col-last even-row-color all-packages-table all-packages-table-tab1">&nbsp;</div>
<div class="col-first odd-row-color all-packages-table all-packages-table-tab1"><a href="org/apache/jena/permissions/impl/package-summary.html">org.apache.jena.permissions.impl</a></div>
<div class="col-last odd-row-color all-packages-table all-packages-table-tab1">&nbsp;</div>
<div class="col-first even-row-color all-packages-table all-packages-table-tab1"><a href="org/apache/jena/permissions/model/package-summary.html">org.apache.jena.permissions.model</a></div>
<div class="col-last even-row-color all-packages-table all-packages-table-tab1">&nbsp;</div>
<div class="col-first odd-row-color all-packages-table all-packages-table-tab1"><a href="org/apache/jena/permissions/model/impl/package-summary.html">org.apache.jena.permissions.model.impl</a></div>
<div class="col-last odd-row-color all-packages-table all-packages-table-tab1">&nbsp;</div>
<div class="col-first even-row-color all-packages-table all-packages-table-tab1"><a href="org/apache/jena/permissions/query/package-summary.html">org.apache.jena.permissions.query</a></div>
<div class="col-last even-row-color all-packages-table all-packages-table-tab1">&nbsp;</div>
<div class="col-first odd-row-color all-packages-table all-packages-table-tab1"><a href="org/apache/jena/permissions/query/rewriter/package-summary.html">org.apache.jena.permissions.query.rewriter</a></div>
<div class="col-last odd-row-color all-packages-table all-packages-table-tab1">&nbsp;</div>
<div class="col-first even-row-color all-packages-table all-packages-table-tab1"><a href="org/apache/jena/permissions/utils/package-summary.html">org.apache.jena.permissions.utils</a></div>
<div class="col-last even-row-color all-packages-table all-packages-table-tab1">&nbsp;</div>
</div>
</div>
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Licensed under the Apache License, Version 2.0</small></p>
</footer>
</div>
</div>
</body>
</html>