-
Notifications
You must be signed in to change notification settings - Fork 586
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OAuth 2.0 authorization code support for Apigee demos (#888)
* Updates to support OAuth auth code grant for API access * update placeholder for OAuth client ID * Moved Apigee OAuth ConfigMap to extras directory * Fixing linter errors * More linting error fixes * Revert changes to main frontend manifest
- Loading branch information
Showing
8 changed files
with
586 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Apigee + ASM | ||
|
||
[Apigee](https://cloud.google.com/apigee) + [Anthos Service Mesh](https://cloud.google.com/anthos/service-mesh) can be leveraged to expose the Bank of Anthos microservices as a set of secure, managed APIs which can be accessed by other applications (e.g. mobile apps, voice assistants and more) or by partner developers. | ||
|
||
[Apigee Developer Portals](https://cloud.google.com/apigee/docs/api-platform/publish/publishing-overview) provide self-service developer onboarding and allow for creation of easy-to-use [API documentation with try-it functionality](https://cloud.google.com/apigee/docs/api-platform/publish/intro-portals). | ||
|
||
[Apigee Analytics](https://cloud.google.com/apigee/docs/api-platform/analytics/analytics-services-overview) provides API teams with rich dashboards, including operational metrics and detailed API product usage stats, plus [API Monitoring](https://cloud.google.com/apigee/docs/api-monitoring) capabilities. | ||
|
||
[Apigee Monetization](https://cloud.google.com/apigee/docs/api-platform/monetization/overview) allows you to build paid rate plans to monetize access to API products. | ||
|
||
Bank of Anthos supports the ability to authorize external access requests made using an [OAuth 2.0 Authorization Code grant type](https://oauth.net/2/grant-types/authorization-code/). Apigee can act as the [authorization server](https://cloud.google.com/apigee/docs/api-platform/security/oauth/oauth-home) that issues and validates the access tokens used to call the APIs securely. This directory contains a [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/) that defines an allowed OAuth client ID and redirect URI. The frontend service will use these to validate incoming OAuth requests. These values should be replaced with a client ID and redirect URI that is defined in an Apigee [API proxy](https://cloud.google.com/apigee/docs/api-platform/fundamentals/understanding-apis-and-api-proxies) that implements the [authorization code grant type](https://cloud.google.com/apigee/docs/api-platform/security/oauth/oauth-v2-policy-authorization-code-grant-type). | ||
|
||
## Prerequisites | ||
|
||
This requires an Apigee Organization that has already been provisioned. Learn how to provision a free eval org [here](https://cloud.google.com/apigee/docs/api-platform/get-started/eval-orgs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2022 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# [START gke_boa_kubernetes_manifests_config_configmap_oauth_config] | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: oauth-config | ||
data: | ||
DEMO_OAUTH_CLIENT_ID: "{APIGEE_CLIENT_ID}" | ||
DEMO_OAUTH_REDIRECT_URI: "https://{APIGEE_DOMAIN}/oauth/callback" | ||
# [END gke_boa_kubernetes_manifests_config_configmap_oauth_config] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.