Skip to content
Snippets Groups Projects
Commit f7c1538d authored by Robert Butora's avatar Robert Butora
Browse files

docker/authz: db_schema removed from params (authz)

parent a61e0f4a
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,6 @@ Configure security:
| **OIDC_CLIENT** | client-id of a Relying party |
| **OIDC_SECRET** | secret of of the client |
| **AUTHZ_DB_URL** | DB where a table with authorization info ('groups' column) can be found |
| **AUTHZ_DB_SCHEMA** | schema of the authorization table |
| **AUTHZ_DB_USERNAME** | user in the DB with authorization table |
| **AUTHZ_DB_PASSWORD** | password for the DB-user |
......
......@@ -14,17 +14,15 @@ class AuthZSettings
public static class DBConn
{
private String uri;
private String schema;
private String user_name;
private String password;
public String toString()
{
return uri() + " [" + schema + "] " + user_name + " / " + password + " ";
return uri() + " " + user_name;
}
public String uri() { return uri; }
public String schema() { return schema; }
public String userName() { return user_name; }
public String password() { return password; }
}
......@@ -78,7 +76,6 @@ class AuthZSettings
DBConn dbconn = new AuthZSettings.DBConn();
dbconn.uri = properties.getProperty("db_uri", "").strip();
dbconn.schema = properties.getProperty("db_schema", "").strip();
dbconn.user_name = properties.getProperty("db_user_name", "").strip();
dbconn.password = properties.getProperty("db_password", "").strip();
return dbconn;
......
......@@ -37,13 +37,12 @@ class Settings
public static class DBConn
{
private String uri;
private String schema;
private String user_name;
private String password;
public String toString()
{
return uri() + " [" + schema + "] " + user_name + " / " + password + " ";
return uri() + " " + user_name;
}
public boolean isDbUriEmpty()
......@@ -52,7 +51,6 @@ class Settings
}
public String uri() { return uri; }
public String schema() { return schema; }
public String userName() { return user_name; }
public String password() { return password; }
}
......@@ -144,7 +142,6 @@ class Settings
{
DBConn dbconn = new Settings.DBConn();
dbconn.uri = properties.getProperty("db_uri", "").strip();
dbconn.schema = properties.getProperty("db_schema", "").strip();
dbconn.user_name = properties.getProperty("db_user_name", "").strip();
dbconn.password = properties.getProperty("db_password", "").strip();
return dbconn;
......
......@@ -61,7 +61,7 @@ COPY deps/context.xml ${WEBAPP_DIR}/META-INF/context.xml
# enable IA2 token filter update
RUN chmod -R a+rwX ${WEBAPP_DIR}/WEB-INF \
&& touch ${WEBAPP_DIR}/WEB-INF/classes/ia2token.properties \
&& touch ${WEBAPP_DIR}/WEB-INF/classes/auth.properties \
&& touch ${WEBAPP_DIR}/WEB-INF/classes/iamtoken.properties \
&& chmod a+rw ${WEBAPP_DIR}/WEB-INF/classes/*.properties
......
......@@ -16,7 +16,6 @@ OIDC_CLIENT=${OIDC_CLIENT:-}
OIDC_SECRET=${OIDC_SECRET:-}
AUTHZ_DB_URL=${AUTHZ_DB_URL:-}
AUTHZ_DB_SCHEMA=${AUTHZ_DB_SCHEMA:-}
AUTHZ_DB_USERNAME=${AUTHZ_DB_USERNAME:-}
AUTHZ_DB_PASSWORD=${AUTHZ_DB_PASSWORD:-}
......@@ -46,7 +45,7 @@ fi
if [ -z "$OIDC_RAP_URL" ] || [ -z "$OIDC_GMS_URL" ] || [ -z "$OIDC_CLIENT" ] || [ -z "$OIDC_SECRET" ] \
[ -z "$AUTHZ_DB_URL" ] || [ -z "$AUTHZ_DB_SCHEMA" ] || [ -z "$AUTHZ_DB_USERNAME" ] || [ -z "$AUTHZ_DB_PASSWORD" ];
[ -z "$AUTHZ_DB_URL" ] || [ -z "$AUTHZ_DB_USERNAME" ] || [ -z "$AUTHZ_DB_PASSWORD" ];
then
echo "Some of OIDC_ or AUTHZ_ is not set. All must be set to activate security."
touch $WEBAPP_DIR/WEB-INF/security.node.xml
......@@ -61,12 +60,11 @@ else
echo "store_state_on_login_endpoint=true"
echo "scope=openid email profile read:rap"
echo "allow_anonymous_access=true"
} > $WEBAPP_DIR/WEB-INF/classes/ia2token.properties
} > $WEBAPP_DIR/WEB-INF/classes/auth.properties
echo "Config VLKB authorization ..."
{
echo "db_uri=$AUTHZ_DB_URL"
echo "db_schema=$AUTHZ_DB_SCHEMA"
echo "db_user_name=$AUTHZ_DB_USERNAME"
echo "db_password=$AUTHZ_DB_PASSWORD"
} > $WEBAPP_DIR/WEB-INF/classes/authpolicy.properties
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment