You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2022/08/20 11:05:54 UTC

[jena-site] branch main-next updated (6fc041f39 -> b22a26fc0)

This is an automated email from the ASF dual-hosted git repository.

andy pushed a change to branch main-next
in repository https://gitbox.apache.org/repos/asf/jena-site.git


 discard 6fc041f39 Documentation for arq:httpServiceSendMode
    omit 27fcae32b Documentation for bearer auth support
     add a2e0a3c4e Initial documentation for custom service executors
     add 1d22e10d1 Link in doc for custom SERVICE implementations
     add dd5095fde missing curly brackets added and some code formattings improved
     add 71016fb25 Note that a javascript engine is required
     add a692d883c Removed line break (#108)
     add 398dc5d35 fix some dead links
     add e052ce151 Update rdf-input.md
     add 51cd82ab1 Update some documentation for tdb2 compacting and cli command (#110)
     new 2438a3d35 Documentation for bearer auth support
     new b22a26fc0 Documentation for arq:httpServiceSendMode

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (6fc041f39)
            \
             N -- N -- N   refs/heads/main-next (b22a26fc0)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 source/about_jena/contributions.md                 |  5 +-
 .../fuseki2/fuseki-server-protocol.md              |  4 +-
 source/documentation/io/rdf-input.md               |  2 +-
 source/documentation/query/__index.md              |  2 +-
 .../query/custom_service_executors.md              | 71 ++++++++++++++++++++++
 source/documentation/query/javascript-functions.md | 27 +++++++-
 source/documentation/rdfconnection/__index.md      | 27 ++++----
 source/documentation/tdb2/tdb2_admin.md            |  6 +-
 source/documentation/tdb2/tdb2_cmds.md             |  8 +++
 source/documentation/tools/__index.md              |  2 +-
 source/getting_involved/__index.md                 |  2 +-
 11 files changed, 133 insertions(+), 23 deletions(-)
 create mode 100644 source/documentation/query/custom_service_executors.md


[jena-site] 02/02: Documentation for arq:httpServiceSendMode

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

andy pushed a commit to branch main-next
in repository https://gitbox.apache.org/repos/asf/jena-site.git

commit b22a26fc053962f8e2ce50f58056a879b799a32a
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Sat Aug 20 12:05:43 2022 +0100

    Documentation for arq:httpServiceSendMode
---
 source/documentation/query/service.md       | 42 ++++++++++++++++++++++++++++-
 source/documentation/sparql-apis/__index.md |  6 ++---
 2 files changed, 43 insertions(+), 5 deletions(-)

diff --git a/source/documentation/query/service.md b/source/documentation/query/service.md
index 49eed5fca..72b69f943 100644
--- a/source/documentation/query/service.md
+++ b/source/documentation/query/service.md
@@ -56,11 +56,51 @@ the title already bound from earlier in the query.
 
 ## Controlling `SERVICE` requests.
 
-The `SERVICE` operation in a SPARQL query may be configured via the Context. The values for configuration can be set in the global context (accessed via 
+The `SERVICE` operation in a SPARQL query may be configured via the Context. 
+The values for configuration can be set in the global context (accessed via 
 `ARQ.getContext()`) or in the per-query execution context.
 
+The prefix `arq:` is `<http://jena.apache.org/ARQ#>`.
+
+Symbol | Java Constant | Default
+------ | ------------- | -------
+`arq:httpServiceAllowed`  | `ARQ.httpServiceAllowed` | true
+`arq:httpQueryClient`     | `ARQ.httpQueryClient`    | System default.
+`arq:httpServiceSendMode` | `ARQ.httpServiceSendMode | unset
+
+#### `arq:httpServiceAllowed`
+
+This setting can be used to disable execution of any SERVICE request in query. 
+Set to "false" to prohibit SERVICE requests.
+
+#### `arq:httpQueryClient`
+
+The java.net.http HttpClient object to use for SERVICE execution.
+
+#### `arq:httpServiceSendMode`
+
+The HTTP operation to use. The value is a string or a `QuerySendMode` object.
+
+String settings are:
+
+Setting | Effect
+------- | ------
+"POST"               | Use HTTP POST. Same as "asPost".
+"GET"                | Use HTTP GET unconditionally. Same as "asGetAlways".
+"asGetAlways"        | Use HTTP GET.
+"asGetWithLimitBody" | Use HTTP GET upto a size limit (usually 2kbytes).
+"asGetWithLimitForm" | Use HTTP GET upto a size limit (usually 2kbytes), and use a HTML form for the query.
+"asPostForm"         | Use HTTP POST and use an HTML form for the query.
+"asPost"             | Use HTTP POST.
+
+
+## Old Context setting
+
+Old settings are honored where possible but should not be used:
+
 The prefix  `srv:` is the IRI `<http://jena.hpl.hp.com/Service#>`.
 
+
 Symbol | Usage | Default
 ------ | ----- | -------
 `srv:queryTimeout` | Set timeouts | none
diff --git a/source/documentation/sparql-apis/__index.md b/source/documentation/sparql-apis/__index.md
index f0192c148..47f0ed657 100644
--- a/source/documentation/sparql-apis/__index.md
+++ b/source/documentation/sparql-apis/__index.md
@@ -262,15 +262,13 @@ authentication, has changed.
 See below for more on HTTP authentication with `SERVICE`.
 
 The configuration of `SERVICE` operations has changed in Jena 4.3.0 and the
-paramter names have changed.
+parameter names have changed.
 
 | Symbol | Java Constant | Usage |
 | ------ | ------------- | --- |
 | `arq:httpServiceAllowed` | `ARQ.httpServiceAllowed` | False to disable |
-| `arq:serviceParams`      | `ARQ.serviceParams`    | Map |
-| `arq:httpQueryTimeout`   | `ARQ.httpQueryTimeout` | Request timeout (time to completion) |
 | `arq:httpQueryClient`    | `ARQ.httpQueryCient`   | An `java.net.http.HttpClient` object |
-| `arq:httpQueryCompression` |  | no-op |
+| `arq:httpServiceSendMode` | `ARQ.httpServiceSendMode` | See [Service documentation](../query/service.html) |
 
 where `arq:` is prefix for `<http://jena.apache.org/ARQ#>`.
 


[jena-site] 01/02: Documentation for bearer auth support

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

andy pushed a commit to branch main-next
in repository https://gitbox.apache.org/repos/asf/jena-site.git

commit 2438a3d3568ae241d99322c994db4f792ec3cc46
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Sat Aug 20 12:04:21 2022 +0100

    Documentation for bearer auth support
---
 source/documentation/sparql-apis/http-auth.md | 38 ++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 4 deletions(-)

diff --git a/source/documentation/sparql-apis/http-auth.md b/source/documentation/sparql-apis/http-auth.md
index a5742bc4f..f742cef98 100644
--- a/source/documentation/sparql-apis/http-auth.md
+++ b/source/documentation/sparql-apis/http-auth.md
@@ -38,9 +38,14 @@ information.  To make this automatic, the first request must not be a streaming
 request (the stream is not repeatable). All HTTP request generated by Jena are
 repeatable.
 
-The URL can contain a `userinfo` part, either the `users@host` form, or the `user:password@host` form.
-If just the user is given, the authentication environment is consulted for registered users-password information. If user and password is given, the details as given are used. This latter form is not recommended and should only be used if necessary because the password is in-clear in the SPARQL
-query.
+The URL can contain a `userinfo` part, either the `users@host` form, or the
+`user:password@host` form.  If just the user is given, the authentication
+environment is consulted for registered users-password information. If user and
+password is given, the details as given are used. This latter form is not
+recommended and should only be used if necessary because the password is
+in-clear in the SPARQL query.
+
+Jena also has [support for bearer authentication](#bearer-authentication).
 
 ### JDK HttpClient.authenticator
 
@@ -137,6 +142,31 @@ used.
     }
 ```
 
-## Examples
+## Authentication Examples
 
 [jena-examples:arq/examples/auth/](https://github.com/apache/jena/tree/main/jena-examples/src/main/java/arq/examples/auth).
+
+## Bearer Authentication
+
+Bearer authentication requires that the application to obtain a token to present
+to the server.
+
+* [RFC 6750](https://tools.ietf.org/html/rfc6750)
+* [RFC 6751](https://tools.ietf.org/html/rfc6751)
+* [JSON Web Tokens (JWT)](https://tools.ietf.org/html/rfc7519)
+* [JSON Web Token Best Current Practices](https://tools.ietf.org/html/rfc8725)
+
+How this token is obtained depends on the deployment environment. 
+
+The application can either register the token to be used:
+
+```
+    AuthEnv.get().addBearerToken(targetURL, jwtString);
+```
+
+or can provide a token provider for 401 challeneges stating bearer authentication.
+
+```
+    AuthEnv.get().setBearerTokenProvider( 
+        (uri, challenge)->{ ... ; return jwtString; });
+```