-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/openid federation #10
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tom Lanser <[email protected]>
Signed-off-by: Tom Lanser <[email protected]>
090a081
to
2d13142
Compare
@@ -22,7 +22,10 @@ export const vCredentialRequestJwtProofTypeHeader = v.pipe( | |||
({ kid, jwk }) => jwk === undefined || kid === undefined, | |||
`Both 'jwk' and 'kid' are defined. Only one is allowed` | |||
), | |||
v.check(({ trust_chain, kid }) => !trust_chain || !kid, `When 'trust_chain' is provided, 'kid' is required`) | |||
v.check( | |||
({ trust_chain, kid }) => !trust_chain || kid !== undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious did you run into an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I did some work on it for supporting this property. I didn't push it with it but I had a array and a kid defined. But I still got this error so I found out that the validation is was not correct.
* Custom fetch implementation to use | ||
*/ | ||
fetch?: Fetch | ||
callbackContext: Pick<CallbackContext, 'fetch' | 'verifyJwt' | 'signJwt'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the rest of the codebase i thinks it's just called callbacks
const result = await fetchWellKnownMetadata(wellKnownMetadataUrl, vCredentialIssuerMetadataWithDraftVersion, fetch) | ||
let result: v.InferOutput<typeof vCredentialIssuerMetadataWithDraftVersion> | null = null | ||
|
||
const entityConfiguration = await fetchEntityConfiguration({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been thinking for a while whether the approach is nice and simple, or that it misses a few things.
What i'm not sure about:
- we lose knowledge about whether federation is used
- we lose knowledge on the verification result
- metadata is dependent on the trust chain. We currently don't support metadata policies but since we will in the future i think it might be better to handle this in credo.
if (entityConfiguration) { | ||
const credentialIssuerMetadata = await v.safeParseAsync( | ||
vCredentialIssuerMetadataWithDraftVersion, | ||
entityConfiguration.metadata?.openid_provider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the issuer metadata called openid_provider?
No description provided.