diff --git a/Config/instanceConfigurator/src/org/akvo/flow/InstanceConfigurator.java b/Config/instanceConfigurator/src/org/akvo/flow/InstanceConfigurator.java index a6cf3764ca..9de2ed17b7 100644 --- a/Config/instanceConfigurator/src/org/akvo/flow/InstanceConfigurator.java +++ b/Config/instanceConfigurator/src/org/akvo/flow/InstanceConfigurator.java @@ -90,12 +90,16 @@ public static void main(String[] args) throws Exception { String emailTo = cli.getOptionValue("et"); String orgName = cli.getOptionValue("on"); String signingKey = cli.getOptionValue("sk"); + String oidcDomain = cli.getOptionValue("oidcDomain"); + String oidcClientId = cli.getOptionValue("oidcClientId"); + String oidcClientSecret = cli.getOptionValue("oidcClientSecret"); String emailHost = cli.getOptionValue("emailHost"); String emailPort = cli.getOptionValue("emailPort"); String emailUser = cli.getOptionValue("emailUser"); String emailPassword = cli.getOptionValue("emailPassword"); String sentryDSN = cli.getOptionValue("sentryDSN"); + File configFileHome = new File(outFolder); if (! configFileHome.exists()) { configFileHome.mkdirs(); } @@ -243,12 +247,16 @@ public static void main(String[] args) throws Exception { webData.put("emailTo", emailTo); webData.put("organization", orgName); webData.put("signingKey", signingKey); + webData.put("oidcDomain", oidcDomain); + webData.put("oidcClientId", oidcClientId); + webData.put("oidcClientSecret", oidcClientSecret); webData.put("emailHost", emailHost); webData.put("emailPort", emailPort); webData.put("emailUser", emailUser); webData.put("emailPassword", emailPassword); webData.put("sentryDSN", sentryDSN); + Template t5 = cfg.getTemplate("appengine-web.xml.ftl"); t5.process(webData, new FileWriter(new File(configFileHome, "/appengine-web.xml"))); @@ -372,6 +380,18 @@ private static Options getOptions() { signingKey.setArgs(1); signingKey.setRequired(true); + Option oidcDomain = new Option("oidcDomain", "ODIC IdP domain"); + oidcDomain.setArgs(1); + oidcDomain.setRequired(true); + + Option oidcClientId = new Option("oidcClientId", "OIDC Client ID"); + oidcClientId.setArgs(1); + oidcClientId.setRequired(true); + + Option oidcClientSecret = new Option("oidcClientSecret", "OIDC Client Secret"); + oidcClientSecret.setArgs(1); + oidcClientSecret.setRequired(true); + options.addOption(orgName); options.addOption(awsId); options.addOption(awsSecret); @@ -392,6 +412,9 @@ private static Options getOptions() { options.addOption(hereMapsAppCode); options.addOption(alias); options.addOption(signingKey); + options.addOption(oidcDomain); + options.addOption(oidcClientId); + options.addOption(oidcClientSecret); return options; } diff --git a/Config/instanceConfigurator/src/org/akvo/flow/templates/appengine-web.xml.ftl b/Config/instanceConfigurator/src/org/akvo/flow/templates/appengine-web.xml.ftl index 5a48fa06eb..0940d5a746 100644 --- a/Config/instanceConfigurator/src/org/akvo/flow/templates/appengine-web.xml.ftl +++ b/Config/instanceConfigurator/src/org/akvo/flow/templates/appengine-web.xml.ftl @@ -58,6 +58,9 @@ + + +