Search in sources :

Example 1 with SaltClientConfig

use of com.sequenceiq.cloudbreak.client.SaltClientConfig in project cloudbreak by hortonworks.

the class GatewayConfigService method getSaltClientConfig.

private SaltClientConfig getSaltClientConfig(Stack stack) {
    SecurityConfig securityConfig = stack.getSecurityConfig();
    SaltSecurityConfig saltSecurityConfig = securityConfig.getSaltSecurityConfig();
    String privateKey = saltSecurityConfig.getSaltBootSignPrivateKey();
    String saltBootPassword = saltSecurityConfig.getSaltBootPassword();
    String saltPassword = saltSecurityConfig.getSaltPassword();
    return new SaltClientConfig(saltPassword, saltBootPassword, new String(Base64.decodeBase64(privateKey)));
}
Also used : SecurityConfig(com.sequenceiq.cloudbreak.domain.SecurityConfig) SaltSecurityConfig(com.sequenceiq.cloudbreak.domain.SaltSecurityConfig) SaltClientConfig(com.sequenceiq.cloudbreak.client.SaltClientConfig) SaltSecurityConfig(com.sequenceiq.cloudbreak.domain.SaltSecurityConfig)

Example 2 with SaltClientConfig

use of com.sequenceiq.cloudbreak.client.SaltClientConfig in project cloudbreak by hortonworks.

the class GatewayConfigService method getSaltClientConfig.

private SaltClientConfig getSaltClientConfig(Stack stack) {
    SecurityConfig securityConfig = stack.getSecurityConfig();
    SaltSecurityConfig saltSecurityConfig = securityConfig.getSaltSecurityConfig();
    String privateKey = saltSecurityConfig.getSaltBootSignPrivateKey();
    String saltBootPassword = saltSecurityConfig.getSaltBootPassword();
    String saltPassword = saltSecurityConfig.getSaltPassword();
    return new SaltClientConfig(saltPassword, saltBootPassword, new String(Base64.decodeBase64(privateKey)));
}
Also used : SaltSecurityConfig(com.sequenceiq.freeipa.entity.SaltSecurityConfig) SecurityConfig(com.sequenceiq.freeipa.entity.SecurityConfig) SaltClientConfig(com.sequenceiq.cloudbreak.client.SaltClientConfig) SaltSecurityConfig(com.sequenceiq.freeipa.entity.SaltSecurityConfig)

Aggregations

SaltClientConfig (com.sequenceiq.cloudbreak.client.SaltClientConfig)2 SaltSecurityConfig (com.sequenceiq.cloudbreak.domain.SaltSecurityConfig)1 SecurityConfig (com.sequenceiq.cloudbreak.domain.SecurityConfig)1 SaltSecurityConfig (com.sequenceiq.freeipa.entity.SaltSecurityConfig)1 SecurityConfig (com.sequenceiq.freeipa.entity.SecurityConfig)1