Conversation
|
Very good. Only some comments and smaller improvement proposals:
|
|
Good comments. I took over all your proposals. Concerning your question about the spec, it says nothing about the case where both claims are present, only about the priority. If the the webid claim is present, it should be used. |
|
Very good. Thanks for looking up the WebId spec. So the decision |
14da0b8 to
e15d4b8
Compare
Bumps [smallrye-health](https://github.com/smallrye/smallrye-health) from 2.2.0 to 2.2.1. - [Release notes](https://github.com/smallrye/smallrye-health/releases) - [Commits](smallrye/smallrye-health@2.2.0...2.2.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Bumps `dropwizardVersion` from 2.0.8 to 2.0.9. Updates `dropwizard-core` from 2.0.8 to 2.0.9 Updates `dropwizard-client` from 2.0.8 to 2.0.9 Updates `dropwizard-testing` from 2.0.8 to 2.0.9 Updates `dropwizard-metrics` from 2.0.8 to 2.0.9 Updates `dropwizard-http2` from 2.0.8 to 2.0.9 Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump quarkus-bom from 1.4.1.Final to 1.4.2.Final Bumps [quarkus-bom](https://github.com/quarkusio/quarkus) from 1.4.1.Final to 1.4.2.Final. - [Release notes](https://github.com/quarkusio/quarkus/releases) - [Commits](quarkusio/quarkus@1.4.1.Final...1.4.2.Final) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Update plugin version Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Aaron Coburn <acoburn@apache.org>
Introduction Review
Code Review
|
|
Thanks for the comments. Concerning the PR description, I agree basically, I'd just wont write "...in his Other POD hosted ...", just "in his POD hosted ...". The user may only have one POD on Trellis and an Identity by the Identity Provider. |
|
I agree with all the code comments, except the last one. I'm not sure whether an immutable design works in our case, because the configuration classes are not only JSON serializable, they must also be read from a YAML configuration supporting property default values. The deserialization from the config file must be able to create the objects in absence of a property using a default value. We could try the approach from here, but I'm not sure whether it makes sense in this PR, because the rest of the configuration classes in Trellis are mutable. |
|
Thanks for the consideration of my review. Here my thoughts about your last 2 messages and the new code.
Unfortunately I only noticed now, that the SLF4J 1.7.30 API suppresses stack traces when logging a parameterized message with a causing exception. Only SLF4J 2.0 will be capable to combine severity selection, parameter insertion, and an exception by a fluent API. Example: If you want to achieve the same including stack trace logging with SLF4J 1.7.30, you have to test the severity and insert the parameters manually in the old style: Where are message parameters and exception in logging?I found one logging statement in the PR, where a causing exception is combined with a parameterized message. If in this place we need the stack trace to be logged, we will have to use the just mentioned manual severity check and message parameterization.
|
|
Then one solution would be to use error(message, throwable) and to format the message with String.format(format, args). |
…e when using logger#error.
|
How you format the message is freely electable, but with SLF4J < 2.0 you should include the manual severity checking by if as above, in order to avoid useless string interpolation, if the severity is not configured to be reported. Although I admit this would be more important if severity were DEBUG. |
|
Exactly, I think the error level will be always on and the check it is not very valuable. With the String#format method the exception stack trace will be also logged, right? |
|
Yes, then you have only 2 arguments of types (String, Throwable), and the Throwable is not stringized as a normal message argument. Nevertheless I prefer to follow the pattern |
|
But it is OK as it is now. If really someone reduces the severity to |
Introduction
The purpose of this PR is to implement support for the WebId-OIDC standard used by the Solid project. This would make possible an integration between Trellis and the Node Solid Server (NSS) like: A User accesses a resource in his POD hosted on Trellis (Resource Server and Relying Party) and uses his authentication data presented by a Solid client (Presenter) after a login step against a NSS server (Identity Provider).
I'm not an specialist in OAuth and OIDC protocols, please correct me if I miss something here.
The solid-auth-client library sends a so called Proof of Possession (PoP) token in the
Authorizationheader asBearertoken.This PoP token is constructed from my point of view according to the WebId-OIDC Spec.
In short the NSS server issues a JWT token on user login, which is embedded in a client generated token as
id_tokenclaim.The
id_tokencontains additionally public key information from the client for a signature validation aligning to the JWK specification. The following is an example of a PoP token extracted from requests an example Solid App sends:The embedded
id_tokenis:{"alg":"RS256", "kid":"m6hdkJtyAJM"}. { "iss": "https://solid.community", "sub": "https://orisha2.solid.community/profile/card#me", "aud": "7bc774a71455546534c821686f2a5993", "exp": 1574592332, "iat": 1573382732, "jti": "347676826d25d3d4", "nonce": "Ww9_k9r7cpiuL495V1X7Pnt5TvRsMJ0oQbxK5vGv-gs", "azp": "7bc774a71455546534c821686f2a5993", "cnf": { "jwk": { "alg": "RS256", "e": "AQAB", "ext": true, "key_ops": [ "verify" ], "kty": "RSA", "n": "jocytHgM-3L7P3PvUlIMXsaP9TAkQwun7HXd1QZ9eCcPiWXcu070hQx0ogNEg1uMArBGwzc8K4PJe0N8i4A2fpvLK8uHVOnSTaVXN8dPSRXlsFtLgRqBXxHsGXdjdRqKyasB4dxeYMKhajiJjr7P5YkBSyGL_BoKBBX5xC7cfZqmwbKYJ2kiKNF5EOp-NH6V9QlYWT2Yf6347s3Z5ltUPGUG30cxb3zu4gd9mV-kSO3jHhQ0u02n5yhQVrUe8jeOEGt_srPystoGZDW3gN_Isezf1YLpj7TEmLn8pbBRyNpi8iqV5lYmd2HAisCijRE5X2veTpbqgRXL1HXMZdaKBw" } }, "at_hash": "zihakOfULQlcTG-y0xXNyQ" }Implementation
Besides the usual JWS checks and the WebId derivation, WebId-OIDC requires several additional checks due to the decentralized multi-party nature of the use case. The NSS is the reference implementation for a Solid backend and does the following steps in accordance with the specification (the steps below link to the corresponding code lines in the NSS implementation):
Our implementation reassembles these steps in the new
WebIdOIDCAuthenticatorclass.The WebId-OIDC support is configurable as the other JWT based authentication possibilities. Additionally to the
jwtflag the newwebIdOIDCnode must be defined under the nodejwtto activate the feature. This configuration node introduced by the PR has the form:The cache in this feature is used for the known WebId-OIDC provider keys, fetched on demand according to the OIDC provider metadata discovery.
References: