Class ExternalProviderProperties
Providers.- Since:
- 1.8.6
- Author:
- Nathan Moore (nathandmoore)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe names of external microservices that are expected to call Catalog Browse and should be whitelisted so that user information they provide in aPriceContextor similar are trusted over trying to consult theSecurityContextto glean the same user target information.voidsetWhitelistedServiceCallers(Set<String> whitelistedServiceCallers) The names of external microservices that are expected to call Catalog Browse and should be whitelisted so that user information they provide in aPriceContextor similar are trusted over trying to consult theSecurityContextto glean the same user target information.
-
Constructor Details
-
ExternalProviderProperties
public ExternalProviderProperties()
-
-
Method Details
-
getWhitelistedServiceCallers
The names of external microservices that are expected to call Catalog Browse and should be whitelisted so that user information they provide in aPriceContextor similar are trusted over trying to consult theSecurityContextto glean the same user target information.When another service calls Catalog Browse, the original user's (e.g., customer) auth token is replaced by the calling service's, so any information about them must be provided in the request rather than in the auth.
Currently, there is no other way to use the
SecurityContextto differentiate between another service calling Catalog Browse vs an anonymous user whose request is proxied by a commerce gateway since both will receive a similar token from the Auth Service. Therefore, the principal's name is relied upon. -
setWhitelistedServiceCallers
The names of external microservices that are expected to call Catalog Browse and should be whitelisted so that user information they provide in aPriceContextor similar are trusted over trying to consult theSecurityContextto glean the same user target information.When another service calls Catalog Browse, the original user's (e.g., customer) auth token is replaced by the calling service's, so any information about them must be provided in the request rather than in the auth.
Currently, there is no other way to use the
SecurityContextto differentiate between another service calling Catalog Browse vs an anonymous user whose request is proxied by a commerce gateway since both will receive a similar token from the Auth Service. Therefore, the principal's name is relied upon.
-