-
Notifications
You must be signed in to change notification settings - Fork 341
Authentication Strategies
To login to the API Umbrella admin, the following authentication strategies are enabled by default:
In addition, API Umbrella ships with the following optional authentication strategies that can be enabled:
To enable additional authentication strategies, enable them in the /etc/api-umbrella/api-umbrella.yml
configuration file:
web:
admin:
auth_strategies:
enabled:
- facebook
- github
- google
- max.gov
- myusa
- persona
API Umbrella uses the OmniAuth library, which supports many more authentication strategies. If you would like additional strategies to be shipped with the default API Umbrella installation, please open an issue.
Each authentication strategy has specific considerations.
Mozilla Persona should work without any additional configuration.
The GitHub authentication strategy needs the following information:
- client_id
- client_secret
To set up the GitHub authentication strategy:
- Review and follow the Github API Basics of Authentication
- Login to your account and create a new application.
- The Homepage URL should be:
https://yourdomain.com
(use the domain where API Umbrella is deployed) - The Authorization callback URL should be:
https://yourdomain.com/admins/auth/github/callback
- Add your
client_id
andclient_secret
to/etc/api-umbrella/api-umbrella.yml
:
web:
admin:
auth_strategies:
github:
client_id: YOUR_CLIENT_ID_HERE
client_secret: YOUR_CLIENT_SECRET_HERE
- Restart API Umbrella
The Google authentication strategy needs the following information:
- client_id
- client_secret
To set up the Google authentication strategy:
- Review and follow the Google OAuth for Login documentation
- Login to the Google API Console.
- Navigate to APIs & auth > Credentials and under the OAuth section click Create new Client ID.
- The Application Type should be: Web application.
- The Authorized Javascript Origins should be:
https://yourdomain.com
(use the domain where API Umbrella is deployed) - The Authorized Redirect URIs should be:
https://api.example.com/admins/auth/google_oauth2/callback
- Add your
client_id
andclient_secret
to the api-umbrella.yml:
web:
admin:
auth_strategies:
google:
client_id: YOUR_CLIENT_ID_HERE
client_secret: YOUR_CLIENT_SECRET_HERE
- Restart API Umbrella