Skip to content

fix(interfaces-oauth): update lib to reconcile oauth clients holistically - #678

Merged
natalian98 merged 1 commit into
canonical:mainfrom
natalian98:IAM-2328-update-oauth-lib
Sep 11, 2026
Merged

fix(interfaces-oauth): update lib to reconcile oauth clients holistically#678
natalian98 merged 1 commit into
canonical:mainfrom
natalian98:IAM-2328-update-oauth-lib

Conversation

@natalian98

Copy link
Copy Markdown
Contributor

Description

This PR updates charmlibs-interfaces-oauth to backport changes from charms.hydra.v0.oauth.

Summary of changes in charmlibs-interfaces-oauth

1. Core Library

• Added OAuthProvider.get_client_config() and get_client_secret() helper methods.
• Updated OAuthProvider._create_juju_secret() to update existing secrets via set_content() instead of re-adding them.
• Updated secret lookups to use refresh=True so rotated secret revisions aren't stale.
• Wrapped databag parsing in try ... except DataValidationError to log warnings rather than crashing hooks on incomplete data.

2. Documentation & Exports

• Updated the module docstring to add the Provider reference documentation for OAuthProvider.get_client_config().

3. Versioning & Release Notes

• _version.py: Bumped version to 1.1.0.
• CHANGELOG.md: Added release notes entry for 1.1.0.

4. Unit Tests (tests/unit/test_oauth_provider.py)

• Added tests for get_client_config(), get_client_secret(), updating existing secret content, and handling invalid relation data.

@nsklikas nsklikas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@natalian98
natalian98 merged commit 7953edc into canonical:main Sep 11, 2026
29 checks passed
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.

2 participants