You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-3Lines changed: 26 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -337,6 +337,9 @@ CREATE TABLE http (
337
337
)
338
338
```
339
339
340
+
Note that when using OIDC, it adds an `Authentication` header with the bearer token; this will override
341
+
an existing `Authorization` header specified in configuration.
342
+
340
343
#### Custom request/response callback
341
344
342
345
- Http Sink processes responses that it gets from the HTTP endpoint along their respective requests. One can customize the
@@ -410,13 +413,30 @@ In this special case, you can configure connector to trust all certificates with
410
413
To enable this option use `gid.connector.http.security.cert.server.allowSelfSigned` property setting its value to `true`.
411
414
412
415
## Basic Authentication
413
-
The connector supports Basic Authentication mechanism using HTTP `Authorization` header.
416
+
The connector supports Basic Authentication using a HTTP `Authorization` header.
414
417
The header value can be set via properties, similarly as for other headers. The connector converts the passed value to Base64 and uses it for the request.
415
418
If the used value starts with the prefix `Basic `, or `gid.connector.http.source.lookup.use-raw-authorization-header`
416
419
is set to `'true'`, it will be used as header value as is, without any extra modification.
417
420
421
+
## OIDC Bearer Authentication
422
+
The connector supports Bearer Authentication using a HTTP `Authorization` header. The [OAuth 2.0 rcf](https://datatracker.ietf.org/doc/html/rfc6749) mentions [Obtaining Authorization](https://datatracker.ietf.org/doc/html/rfc6749#section-4)
423
+
and an authorization grant. OIDC makes use of this [authorisation grant](https://datatracker.ietf.org/doc/html/rfc6749#section-1.3) in a [Token Request](https://openid.net/specs/openid-connect-core-1_0.html#TokenRequest) by including a [OAuth grant type](https://oauth.net/2/grant-types/) and associated properties, the response is the [token response](https://openid.net/specs/openid-connect-core-1_0.html#TokenResponse).
424
+
425
+
If you want to use this authorization then you should supply the `Token Request` body in `application/x-www-form-urlencoded` encoding
426
+
in configuration property `gid.connector.http.security.oidc.token.request`. See [grant extension](https://datatracker.ietf.org/doc/html/rfc6749#section-4.5) for
427
+
an example of a customised grant type token request. The supplied `token request` will be issued to the
428
+
[token end point](https://datatracker.ietf.org/doc/html/rfc6749#section-3.2), whose url should be supplied in configuration property
429
+
`gid.connector.http.security.oidc.token.endpoint.url`. The returned `access token` is then cached and used for subsequent requests; if the token has expired then
430
+
a new one is requested. There is a property `gid.connector.http.security.oidc.token.expiry.reduction`, that defaults to 1 second; new tokens will
431
+
be requested if the current time is later than the cached token expiry time minus `gid.connector.http.security.oidc.token.expiry.reduction`.
432
+
433
+
### Restrictions at this time
434
+
* No authentication is applied to the token request.
435
+
* The processing does not use the refresh token if it present.
| connector | required | The Value should be set to _rest-lookup_|
@@ -436,19 +456,22 @@ is set to `'true'`, it will be used as header value as is, without any extra mod
436
456
| gid.connector.http.security.cert.client | optional | Path to trusted certificate that should be used by connector's HTTP client for mTLS communication. |
437
457
| gid.connector.http.security.key.client | optional | Path to trusted private key that should be used by connector's HTTP client for mTLS communication. |
| gid.connector.http.security.oidc.token.request | optional | OIDC `Token Request` body in `application/x-www-form-urlencoded` encoding |
460
+
| gid.connector.http.security.oidc.token.endpoint.url | optional | OIDC `Token Endpoint` url, to which the token request will be issued |
461
+
| gid.connector.http.security.oidc.token.expiry.reduction | optional | OIDC tokens will be requested if the current time is later than the cached token expiry time minus this value. |
439
462
| gid.connector.http.source.lookup.request.timeout | optional | Sets HTTP request timeout in seconds. If not specified, the default value of 30 seconds will be used. |
440
463
| gid.connector.http.source.lookup.request.thread-pool.size | optional | Sets the size of pool thread for HTTP lookup request processing. Increasing this value would mean that more concurrent requests can be processed in the same time. If not specified, the default value of 8 threads will be used. |
441
464
| gid.connector.http.source.lookup.response.thread-pool.size | optional | Sets the size of pool thread for HTTP lookup response processing. Increasing this value would mean that more concurrent requests can be processed in the same time. If not specified, the default value of 4 threads will be used. |
442
465
| gid.connector.http.source.lookup.use-raw-authorization-header | optional | If set to `'true'`, uses the raw value set for the `Authorization` header, without transformation for Basic Authentication (base64, addition of "Basic " prefix). If not specified, defaults to `'false'`. |
443
466
| gid.connector.http.source.lookup.request-callback | optional | Specify which `HttpLookupPostRequestCallback` implementation to use. By default, it is set to `slf4j-lookup-logger` corresponding to `Slf4jHttpLookupPostRequestCallback`. |
| connector | required | Specify what connector to use. For HTTP Sink it should be set to _'http-sink'_. |
450
-
| url | required | The base URL that should be use for HTTP requests. For example _http://localhost:8080/client_.|
451
473
| format | required | Specify what format to use. |
474
+
| url | required | The base URL that should be use for HTTP requests. For example _http://localhost:8080/client_.|
452
475
| insert-method | optional | Specify which HTTP method to use in the request. The value should be set either to `POST` or `PUT`. |
453
476
| sink.batch.max-size | optional | Maximum number of elements that may be passed in a batch to be written downstream. |
454
477
| sink.requests.max-inflight | optional | The maximum number of in flight requests that may exist, if any more in flight requests need to be initiated once the maximum has been reached, then it will be blocked until some have completed. |
0 commit comments