-
Notifications
You must be signed in to change notification settings - Fork 339
feat(auth): Added OIDCProviderConfig type and get/delete APIs #442
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with couple questions.
|
||
def delete_oidc_provider_config(self, provider_id): | ||
_validate_oidc_provider_id(provider_id) | ||
self._make_request('delete', '/oauthIdpConfigs/{0}'.format(provider_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we return the status 'success/failed' here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return of these delete methods are void
.
def _validate_oidc_provider_id(provider_id): | ||
if not isinstance(provider_id, str): | ||
raise ValueError( | ||
'Invalid OIDC provider ID: {0}. Provider ID must be a non-empty string.'.format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not check for empty strings though, will it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The immediate next check (if not provider_id.startswith('oidc.'):
) will cover empty strings.
* feat(auth): APIs for retrieving and deleting tenants (#422) * feat(auth): Added Tenant class and get_tenant() API * Added delete_tenant() API * Added delete_tenant to _all_ list * Fixing a lint error * Fixing a lint error * Added create_tenant() and update_tenant() APIs (#424) * Create tenant API * Added update tenant API * Added docstring to fix lint error * Added list_tenants() API (#429) * Added list_tenants() API * Update firebase_admin/tenant_mgt.py Co-Authored-By: Lahiru Maramba <[email protected]> * Updated error message Co-authored-by: Lahiru Maramba <[email protected]> * Moved all public auth APIs to _AuthClient (#430) * Tenant-scoped user management operations (#431) * Adding tenant_mgt.auth_for_tenant() API * Added more tenant-aware user mgt tests * Full test coverage for tenant-aware user mgt APIs * Updated docstring to fix lint error * Removed unused var; Fixing lint error * Tenant-aware ID token verification support (#432) * Tenant-aware ID token verification support * Extended InvalidArgumentError in TenantIdMismatchError * Fixing lint errors * Added tenant-scoped custom token support (#433) * Added tenant-scoped custom token support * Fixed a lint error; Improved test assertion * Renamed _AuthService to Client (#436) * Renamed _AuthService to Client * Renamed some local variables for consistency * Added documentation to Client APIs * Fixed doc lint error * feat(auth): Adding SAMLProviderConfig type and the getter method (#437) * feat(auth): Adding SAMLProviderConfig type and the getter method * Added ConfigurationNotFoundError type * Fixing a lint error related to super delegation * feat(auth): Added create and update APIs for SAMLProviderConfig (#440) * feat(auth): Added create_saml_provider_config() API * Added update_saml_provider_config() API * Moved auth.Client to a separate submodule * Moved auth.Client; Updated docs * feat(auth): Added delete and list APIs for SAMLProviderConfig (#441) * feat(auth): Added delete_saml_provider_config() API * Preliminary list provider config impl * Refactored the common paging logic into base classes * Added more tests for list API * feat(auth): Added OIDCProviderConfig type and get/delete APIs (#442) * feat(auth): Added OIDCProviderConfig type and get/delete APIs * Added newline to eof * OIDCProviderConfig create/update APIs (#443) * feat(auth): Added list_oidc_provider_configs() API (#444) * fix(auth): Integration tests for multi-tenancy and IdP management APIs (#446) * fix(auth): Integration tests for IdP management APIs * More integration tests for tenant_mgt module; Made display_name required for tenants * Integration tests for tenant-aware IdP management * Fixing lint error; Added unit test for UserRecord.tenant_id * Trigger staging * Added unit tests for tenant names longer than 20 chars * Updated API reference docs * fix(auth): Snippets for multi-tenancy and IdP management APIs (#455) Co-authored-by: Lahiru Maramba <[email protected]>
OIDCProviderConfig
class.