我有一个问题。我在我的 Identity Platform 中设置了一个新租户,我需要在 OpenAPI 文档中为 API 网关设置安全定义,以验证仅属于这个新租户的用户。
例如,对于默认的 firebase 身份验证将是这样的:
securityDefinitions:
firebase:
authorizationUrl: ""
flow: "implicit"
type: "oauth2"
x-google-issuer: "https://securetoken.google.com/{projectID}"
x-google-jwks_uri: "https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com"
x-google-audiences: "{projectID}"
并且对于验证服务帐户将是这样的:
securityDefinitions:
saOAuth:
authorizationUrl: ""
flow: "implicit"
type: "oauth2"
x-google-issuer: "{saName}@{projectID}.iam.gserviceaccount.com"
x-google-jwks_uri: "https://www.googleapis.com/robot/v1/metadata/x509/{saName}@{projectID}.iam.gserviceaccount.com"
x-google-audiences: "{someAudience}"
那么,如何为特定租户定义?