Skip to content

Commit

Permalink
Stage 5 - full integration
Browse files Browse the repository at this point in the history
  • Loading branch information
sashaCher committed Dec 22, 2021
1 parent c7e947c commit 5e0a0e2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions design/authenticators/authn_jwt/authn-jwt-fetch-more-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,32 @@ non-functional - decoupling variables from main BL requirements.
![image](fetch-more-keys-stage-4.png)
</div></details>

5. Create new `FetchStaticSigningKey` class parses the `public-keys` variable value and returns a valid JWKS structure
<details><div>

FetchStaticSigningKey` class:
- partially implements ephemeral `FetchSigningKey` interface:
- `call` method receives `force_read` parameter, but ignores it
- `fetch_signing_key` method does not require implementation
- receives `signing_key` value in ctor
- parses and validates `signing_key` value in `call`
For reference see expected validation errors below and `CreateJwksFromHttpResponse.parse_jwks_response`

`CreateSigningKeyProvider` class:
- creates and returns `FetchStaticSigningKey` class when `signing_key_type` is `STATIC`
- passes `signing_key` from `SigningKeySettings`

![image](fetch-more-keys-stage-5.png)

### Expected validation errors
| **Error message** | **Description** |
|-------------------|-----------------|
| Signing key configuration is invalid: JSON parsing error from JSON gem | When the variable value is not a valid JSON |
| Signing key configuration is invalid: `public-keys` `type` field value is missing or empty | When type field absent or has empty value |
| Signing key configuration is invalid: `public-keys` `type` field value {} is wrong | When type field value is no `jwks` |
| Signing key configuration is invalid: `public-keys` `value` field is missing or empty | When value field absent or has empty value |
</div></details>

### Flow Diagrams
[//]: # "Describe flow of main scenarios in the system. The description should include if / else decisions and loops"

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5e0a0e2

Please sign in to comment.