public Settings(UiSecurity uiSecurity) { setOverrideBaseUrl(uiSecurity.getOverrideBaseUrl()); if (uiSecurity.getSsl().isEnabled()) { scheme = "https"; } } }
public Settings(UiSecurity uiSecurity) { setOverrideBaseUrl(uiSecurity.getOverrideBaseUrl()); if (uiSecurity.getSsl().isEnabled()) { scheme = "https"; } } }
@Override protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { super.setProfile(profile, deploymentConfiguration, endpoints); ServiceSettings deckSettings = endpoints.getServiceSettings(Type.DECK); ServiceSettings gateSettings = endpoints.getServiceSettings(Type.GATE); ApacheSsl apacheSsl= deploymentConfiguration.getSecurity().getUiSecurity().getSsl(); Map<String, String> env = profile.getEnv(); if (apacheSsl.isEnabled()) { env.put("DECK_HOST", deckSettings.getHost()); env.put("DECK_PORT", deckSettings.getPort() + ""); env.put("API_HOST", gateSettings.getBaseUrl()); env.put("DECK_CERT", apacheSsl.getSslCertificateFile()); env.put("DECK_KEY", apacheSsl.getSslCertificateKeyFile()); env.put("PASSPHRASE", apacheSsl.getSslCertificatePassphrase()); } env.put("AUTH_ENABLED", Boolean.toString(deploymentConfiguration.getSecurity().getAuthn().isEnabled())); env.put("FIAT_ENABLED", Boolean.toString(deploymentConfiguration.getSecurity().getAuthz().isEnabled())); } }
@Override protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { super.setProfile(profile, deploymentConfiguration, endpoints); ServiceSettings deckSettings = endpoints.getServiceSettings(Type.DECK); ServiceSettings gateSettings = endpoints.getServiceSettings(Type.GATE); ApacheSsl apacheSsl= deploymentConfiguration.getSecurity().getUiSecurity().getSsl(); Map<String, String> env = profile.getEnv(); if (apacheSsl.isEnabled()) { env.put("DECK_HOST", deckSettings.getHost()); env.put("DECK_PORT", deckSettings.getPort() + ""); env.put("API_HOST", gateSettings.getBaseUrl()); env.put("DECK_CERT", apacheSsl.getSslCertificateFile()); env.put("DECK_KEY", apacheSsl.getSslCertificateKeyFile()); env.put("PASSPHRASE", apacheSsl.getSslCertificatePassphrase()); } env.put("AUTH_ENABLED", Boolean.toString(deploymentConfiguration.getSecurity().getAuthn().isEnabled())); env.put("FIAT_ENABLED", Boolean.toString(deploymentConfiguration.getSecurity().getAuthz().isEnabled())); } }
@Override public String installArtifactCommand(DeploymentDetails deploymentDetails) { String install = LocalDebianService.super.installArtifactCommand(deploymentDetails); String ssl = deploymentDetails.getDeploymentConfiguration().getSecurity().getUiSecurity().getSsl().isEnabled() ? "a2enmod ssl" : ""; return Strings.join("\n", install, ssl); }
@Override public String installArtifactCommand(DeploymentDetails deploymentDetails) { String install = LocalDebianService.super.installArtifactCommand(deploymentDetails); String ssl = deploymentDetails.getDeploymentConfiguration().getSecurity().getUiSecurity().getSsl().isEnabled() ? "a2enmod ssl" : ""; return Strings.join("\n", install, ssl); }
@Override public ServiceSettings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { Security security = deploymentConfiguration.getSecurity(); if (security.getUiSecurity().getSsl().isEnabled()) { setEnvTrue("DECK_HTTPS"); setEnv("DECK_CERT", security.getUiSecurity().getSsl().getSslCertificateFile()); setEnv("DECK_KEY", security.getUiSecurity().getSsl().getSslCertificateKeyFile()); setEnv("DECK_CA_CERT", security.getUiSecurity().getSsl().getSslCACertificateFile()); } if (security.getAuthn().isEnabled()) { setEnvTrue("AUTH_ENABLED"); setEnv("DECK_HOST", "0.0.0.0"); } if (security.getAuthz().isEnabled()) { setEnvTrue("FIAT_ENABLED"); } return new Settings(security.getUiSecurity()) .setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setHost(security.getAuthn().isEnabled() ? "0.0.0.0" : getDefaultHost()) .setEnabled(true); }
@Override public ServiceSettings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { Security security = deploymentConfiguration.getSecurity(); if (security.getUiSecurity().getSsl().isEnabled()) { setEnvTrue("DECK_HTTPS"); setEnv("DECK_CERT", security.getUiSecurity().getSsl().getSslCertificateFile()); setEnv("DECK_KEY", security.getUiSecurity().getSsl().getSslCertificateKeyFile()); setEnv("DECK_CA_CERT", security.getUiSecurity().getSsl().getSslCACertificateFile()); } if (security.getAuthn().isEnabled()) { setEnvTrue("AUTH_ENABLED"); setEnv("DECK_HOST", "0.0.0.0"); } if (security.getAuthz().isEnabled()) { setEnvTrue("FIAT_ENABLED"); } return new Settings(security.getUiSecurity()) .setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setHost(security.getAuthn().isEnabled() ? "0.0.0.0" : getDefaultHost()) .setEnabled(true); }