Skip to content

Commit

Permalink
fixup! fixup! Add JWTProxy based implementation for SecureServerExposer
Browse files Browse the repository at this point in the history
  • Loading branch information
sleshchenko committed Jul 11, 2018
1 parent b3fe911 commit 5a40729
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public class JwtProxyProvisioner {
static final String JWTPROXY_IMAGE = "ksmster/jwtproxy";
static final String JWT_PROXY_CONFIG_FILE = "config.yaml";
static final String JWT_PROXY_MACHINE_NAME = "che-jwtproxy";
static final String JWT_PROXY_POD_NAME = JWT_PROXY_MACHINE_NAME;

static final String JWT_PROXY_CONFIG_FOLDER = "/config";
static final String JWT_PROXY_PUBLIC_KEY_FILE = "mykey.pub";
Expand Down Expand Up @@ -152,7 +153,7 @@ String getConfigMapName() {
private void ensureJwtProxyInjected(KubernetesEnvironment k8sEnv) throws InfrastructureException {
if (!k8sEnv.getMachines().containsKey(JWT_PROXY_MACHINE_NAME)) {
k8sEnv.getMachines().put(JWT_PROXY_MACHINE_NAME, createJwtProxyMachine());
k8sEnv.getPods().put("che-jwtproxy", createJwtProxyPod(identity));
k8sEnv.getPods().put(JWT_PROXY_POD_NAME, createJwtProxyPod(identity));

KeyPair keyPair = signatureKeyManager.getKeyPair();
if (keyPair == null) {
Expand Down Expand Up @@ -201,7 +202,7 @@ private InternalMachineConfig createJwtProxyMachine() {
private Pod createJwtProxyPod(RuntimeIdentity identity) {
return new PodBuilder()
.withNewMetadata()
.withName("che-jwtproxy")
.withName(JWT_PROXY_POD_NAME)
.withAnnotations(
ImmutableMap.of(
"org.eclipse.che.container.verifier.machine_name", JWT_PROXY_MACHINE_NAME))
Expand Down

0 comments on commit 5a40729

Please sign in to comment.