Skip to content
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

FISH-5743 FISH-5741 define oicd metadata locally #138

Merged
merged 8 commits into from
Nov 11, 2021

Conversation

aubi
Copy link
Contributor

@aubi aubi commented Nov 9, 2021

Description

Enhance @OpenIdProviderMetadata with all necessary metadata to skip autoconfiguration as is currently supported by providerURI.

Reproducer is attached to the Jira issue FISH-5741.

Basically, the configuration can provide information this way:

@OpenIdAuthenticationDefinition(
        //providerURI = "https://dev-ma-mtmzf.us.auth0.com",
        providerMetadata = @OpenIdProviderMetadata(
                        issuer = "https://dev-ma-mtmzf.us.auth0.com/",
                        authorizationEndpoint = "https://dev-ma-mtmzf.us.auth0.com/authorize",
                        tokenEndpoint = "https://dev-ma-mtmzf.us.auth0.com/oauth/token",
                        userinfoEndpoint = "https://dev-ma-mtmzf.us.auth0.com/userinfo",
                        jwksURI = "https://dev-ma-mtmzf.us.auth0.com/.well-known/jwks.json",
                        responseTypesSupported = {"code", "token", "id_token", "code token", "code id_token",
                            "token id_token", "code token id_token"},
                        subjectTypesSupported = {"public"},
                        idTokenSigningAlgValuesSupported = {"HS256", "RS256"}
                ),
        clientId = "...",
...

How to test

In Payara, pom.xml update security connectors to snapshot:
<payara.security-connectors.version>2.2.0-SNAPSHOT</payara.security-connectors.version>

Deploy sample app, login.
Try to comment providerURI, providerMetadata and payara.security.openid.provider.issuer in microprofile-config.properties. This fails with exception complaining issuer is required.
Try to uncomment each option, any of the will work.

@aubi aubi changed the title Fish 5743 FISH-5741 define oicd metadata locally FISH-5743 FISH-5741 define oicd metadata locally Nov 9, 2021
@aubi aubi force-pushed the FISH-5743-define-oicd-metadata-locally branch from e146365 to 738cf37 Compare November 9, 2021 17:09
Copy link
Contributor

@OndroMih OndroMih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve. I only left a few comments for rather cosmetic improvements, none of them are needed to merge this PR.

No functional change, code style after review.
@aubi aubi merged commit ac708cd into payara:master Nov 11, 2021
@aubi aubi deleted the FISH-5743-define-oicd-metadata-locally branch November 11, 2021 11:04
JamesHillyard pushed a commit to JamesHillyard/ecosystem-security-connectors that referenced this pull request Jan 21, 2022
…a-locally

FISH-5743 FISH-5741 define oicd metadata locally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants