Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@barborico
Copy link
Contributor

@barborico barborico commented Oct 28, 2025

Summary of Changes

This PR introduces a new type of Access plugin called an "app group lifecycle plugin." Such plugins support managing downstream applications based on Access app group existence and membership. This facilitates a light SCIM implementation where downstream apps' support for Okta SCIM is lacking.

Our team has already envisioned three use cases for such a plugin:

UI Screenshots

Create app image
Update app image
Create app group image
View app image
Update app group image
View app group image

Reviewing

There's a lot of code here (thanks, Claude!), so I strongly recommend going commit-by-commit for logically-grouped changes. This is also a substantial enough feature that I'd encourage reviewers to try it themselves in local dev.

Testing

Unit Tests

All of the plugin spec's public functions have unit tests. Run them via:

tox -e test -- tests/test_app_group_lifecycle_plugin.py

E2E Testing

I've installed the example plugin and run the app locally to play around with the UX pretty extensively.


@barborico barborico force-pushed the brynna/app_group_lifecycle_plugin branch 5 times, most recently from 0b8c460 to 23f866d Compare November 8, 2025 08:23
@barborico barborico marked this pull request as ready for review November 8, 2025 08:26
@barborico barborico force-pushed the brynna/app_group_lifecycle_plugin branch from b364a87 to 00a0b8b Compare November 14, 2025 23:39
raise ValueError(f"Duplicate plugin ID detected: {plugin.id}")
if plugin.display_name in seen_display_names:
raise ValueError(f"Duplicate plugin display name detected: {plugin.display_name}")
if plugin.description in seen_descriptions:
Copy link
Collaborator

Choose a reason for hiding this comment

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

We're probably not going to see collisions of plugin descriptions unless someone copy-pastas one as a template, we probably okay not requiring uniqueness, but we can leave this as this is minor either way.

Copy link
Collaborator

@somethingnew2-0 somethingnew2-0 left a comment

Choose a reason for hiding this comment

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

  • ModifyGroupUsers needs to handle membership changes on roles with associated app groups with an app group plugin installed
  • ModifyRoleGroup needs to handle app group membership changes when a role is added or removed from an app group with an app group plugin installed
  • ModifyGroupType needs to handle the case where an app group with a plugin installed is no longer an app group
  • Audit logging should be added for plugin charges (config to an app or group, etc)
  • Missing type definitions for PluginConfigProperties, PluginStatusProperties, and PluginConfigProperty need to exist in apiComponents.ts (does the the client compile/build?)

Dictionary mapping property names to property schemas
"""
# Verify the plugin is registered
plugins = [plugin.id for plugin in get_app_group_lifecycle_plugins()]
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's unlikely we'll have a significant number of plugins for this to matter, but this could probably be made efficient by storing the plugins as a dictionary indexed by id. get_app_group_lifecycle_plugins() would return plugins.values() and get_app_group_lifecycle_plugin(plugin_id: str) would return plugin[plugin_id]

@barborico
Copy link
Contributor Author

  • ModifyGroupUsers needs to handle membership changes on roles with associated app groups with an app group plugin installed
  • ModifyRoleGroup needs to handle app group membership changes when a role is added or removed from an app group with an app group plugin installed
  • Audit logging should be added for plugin charges (config to an app or group, etc)

Good catch! Added the missing logic for these and validated via new unit tests and E2E testing in local dev.

  • Missing type definitions for PluginConfigProperties, PluginStatusProperties, and PluginConfigProperty need to exist in apiComponents.ts (does the the client compile/build?)

Whoops, IDK how these imports got messed up; probably in some interactive rebasing to clean up commit history.

  • ModifyGroupType needs to handle the case where an app group with a plugin installed is no longer an app group

I don't think that there's any handling needed here, as the group will no longer have an associated plugin ID and so hooks won't be called.

Copy link
Collaborator

@somethingnew2-0 somethingnew2-0 left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes! Just one comment on including new plugin_data on the audit log schema.

@barborico barborico merged commit c86980e into main Dec 18, 2025
9 checks passed
@barborico barborico deleted the brynna/app_group_lifecycle_plugin branch December 18, 2025 21:34
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