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

feat: add metadata_store to context #438

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kofzera
Copy link
Contributor

@kofzera kofzera commented May 21, 2023

Added a function that collects metadata for swamid-satosa metainfo plugin for non-SAML backends. The metadata is collected into dictionary and added to the context. The functionality added is similar to saml backend where the context is decorated with metadata of mdstore type.

All Submissions:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what problem you are trying to solve with this PR?
  • Have you added information on what your changes do and why you chose this as your solution?
  • Have you written new tests for your changes?
  • Does your submission pass tests?
  • This project follows PEP8 style guide. Have you run your code against the 'flake8' linter?

@kofzera kofzera force-pushed the decorate_context_with_metadata branch from af3885f to 73d2201 Compare June 20, 2023 06:56
@melanger
Copy link
Contributor

relates to SUNET/swamid-satosa#2

for name in ui_info.get("display_name", []):
if name[1] == "en":
metadata_dict["client_name"] = name[0]
metadata_dict["client_name#" + name[1]] = name[0]
Copy link
Member

Choose a reason for hiding this comment

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

is this a convention that is defined somewhere?
(meaning the <attr>#{language} notation)

Copy link
Contributor

@melanger melanger Jul 4, 2023

Choose a reason for hiding this comment

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

https://openid.net/specs/openid-connect-registration-1_0.html#LanguagesAndScripts

Human-readable Client Metadata values and Client Metadata values that reference human-readable values MAY be represented in multiple languages and scripts. For example, values such as client_name, tos_uri, policy_uri, logo_uri, and client_uri might have multiple locale-specific values in some Client registrations.

To specify the languages and scripts, BCP47 [RFC5646] language tags are added to Client Metadata member names, delimited by a # character. The same syntax is used for representing languages and scripts for Client Metadata as is used for Claims, as described in Section 5.2 (Claims Languages and Scripts) of OpenID Connect Core 1.0 [OpenID.Core].

If such a human-readable field is sent without a language tag, parties using it MUST NOT make any assumptions about the language, character set, or script of the string value, and the string value MUST be used as-is wherever it is presented in a user interface. To facilitate interoperability, it is RECOMMENDED that any human-readable fields sent without language tags contain values suitable for display on a wide variety of systems.

@kofzera kofzera force-pushed the decorate_context_with_metadata branch 2 times, most recently from e212966 to cb720f7 Compare November 14, 2023 08:26
Added a function that collects metadata for swamid-satosa metainfo plugin
for non-SAML backends. The metadata is collected into dictionary and
added to the context. The functionality added is similar to saml backend
where the context is decorated with metadata of mdstore type.
@kofzera kofzera force-pushed the decorate_context_with_metadata branch from cb720f7 to 6e65da2 Compare November 14, 2023 08:27
@melanger
Copy link
Contributor

melanger commented Jan 3, 2024

@c00kiemon5ter Hi, can you please merge this? It should not break anything as it only adds metadata to the Context.

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