Conversation
Add a `metadata` field to applications, allowing administrators to define custom key-value pairs that are injected into issued JWTs under the `client_attrs` claim. This enables resource servers (e.g., EMQX) to use these attributes for ACLs and other dynamic configurations.
- Database: Add `metadata` jsonb column to `applications` table via migration.
- Backend:
- Implement validation to ensure metadata keys are valid identifiers and do not collide with reserved JWT claims.
- Update auth logic to resolve and sanitize application metadata during token generation.
- Frontend:
- Add UI for managing metadata key-value pairs in the Application Form Modal.
- Implement client-side validation for metadata keys.
- Update API types and mock data to support the new field.
- Add i18n translations for metadata-related labels and errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a
metadatafield to applications, allowing administrators to define custom key-value pairs that are injected into issued JWTs under theclient_attrsclaim. This enables resource servers (e.g., EMQX) to use these attributes for ACLs and other dynamic configurations.metadatajsonb column toapplicationstable via migration.