Skip to content

feat(auth): Adding multi-tenancy and IdP management APIs #450

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

Merged
merged 20 commits into from
Apr 27, 2020

Conversation

hiranya911
Copy link
Contributor

@hiranya911 hiranya911 commented Apr 17, 2020

RELEASE NOTE: Added a new tenant_mgt module that provides APIs for creating, updating, retrieving, and deleting authentication tenants.
RELEASE NOTE: Added a new tenant_mgt.auth_for_tenant() function that returns a client object scoped to a specific tenant for performing tenant-aware user management operations.
RELEASE NOTE: Added the auth.OIDCProviderConfig type and related functions to create, retrieve, update and delete OIDC auth provider configurations.
RELEASE NOTE: Added the auth.SAMLProviderConfig type and related functions to create, retrieve, update and delete SAML auth provider configurations.

Resolves #353

hiranya911 and others added 15 commits March 20, 2020 11:00
* 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
* Create tenant API

* Added update tenant API

* Added docstring to fix lint error
* 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]>
* 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

* Extended InvalidArgumentError in TenantIdMismatchError

* Fixing lint errors
* Added tenant-scoped custom token support

* Fixed a lint error; Improved test assertion
* 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

* Added ConfigurationNotFoundError type

* Fixing a lint error related to super delegation
* 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_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

* Added newline to eof
#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
@hiranya911
Copy link
Contributor Author

@egilmorez please review the release notes, and the docstring chages in following files:

  • auth.py
  • _auth_client.py
  • _auth_providers.py
  • _user_mgt.py
  • tenant_mgt.py

Copy link

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

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

A lot of doc strings here! :)

Can I make one global request -- that you go through the strings looking for values that should be backticked as literals? I started marking them, but realized it might be more efficient to let you make a pass with that in mind. Things like:

AuthProviderConfig instances >> AuthProviderConfig instances
None >> None
Tenant object >> Tenant object

LMK if that doesn't make sense. In many of these places it might be possible to just use general references to things like "a user record" instead of "a UserRecord instance.

Thanks!

@hiranya911
Copy link
Contributor Author

@egilmorez made the suggested changes, and also did some additional changes to apply backticks where necessary. I think I've got nearly all of them.

Copy link

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

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

Thanks Hiranya!

@hiranya911 hiranya911 merged commit f2b4f19 into master Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: Multi Tenancy Support like in Node SDK
3 participants