public class ConfigSecurity extends Object
Constructor and Description |
---|
ConfigSecurity() |
Modifier and Type | Method and Description |
---|---|
String |
encryptParentPassword(String application,
String parentApplication,
String parentPassword)
Generate a password (token) valid only for given application to access a given parent
|
void |
init() |
void |
setEncryptorLocator(org.springframework.cloud.config.server.encryption.TextEncryptorLocator encryptorLocator)
By default, this is a
KeyStoreTextEncryptorLocator instance. |
Boolean |
verifyParentPassword(String application,
String parentApplication,
String token,
String expectedParentPassword)
Verify privilege
|
@Autowired public void setEncryptorLocator(org.springframework.cloud.config.server.encryption.TextEncryptorLocator encryptorLocator)
KeyStoreTextEncryptorLocator
instance.@PostConstruct public void init()
public String encryptParentPassword(String application, String parentApplication, String parentPassword)
application
- from child configparentApplication
- from child configparentPassword
- from child configpublic Boolean verifyParentPassword(String application, String parentApplication, String token, String expectedParentPassword)
application
- from context (URL path)parentApplication
- from child configtoken
- from child configexpectedParentPassword
- from parent config (may need to decrypt before verify)Copyright © 2018. All rights reserved.