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

Provider login/consent views do not read client_name correctly #297

Open
matteo-s opened this issue Dec 15, 2023 · 1 comment
Open

Provider login/consent views do not read client_name correctly #297

matteo-s opened this issue Dec 15, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@matteo-s
Copy link

The provider authz_request_view shows the client_organization_name to the user in the login page. It reads the name from the resolved metadata, and falls back to client_id.

"client_organization_name": tc.metadata.get(
"client_name", self.payload["client_id"]
),

Same goes for consent

"client_organization_name": tc.metadata.get(
"client_name", session.client_id
),

The client_name is always blank, because it is provided inside the openid_relying_party subsection.

something like this fixes the issue

        context = {
            "client_organization_name": tc.metadata.get(
                "openid_relying_party", {}).get("client_name", self.payload["client_id"]),

I'm also wondering whether displaying the client_name is the best approach here, given that we should have the proper organization_name inside the federation metadata, which is required for CIE/SPID RPs as per https://docs.italia.it/italia/spid/spid-cie-oidc-docs/it/versione-corrente/metadata_oidc_rp.html

@peppelinux
Copy link
Member

it should be better to point to

metadata.federation_entity.organization_name
if any, or
metadata.openid_relying_party.organization_name
if any, or
metadata.openid_relying_party.client_name
if any, or
metadata.openid_relying_party.client_id

do you agree?
If yes and if you can, please provide a PR for this

@peppelinux peppelinux added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants