From 7fc8dc6a15cf46a23bc1aaca7fcdf427f601f462 Mon Sep 17 00:00:00 2001 From: Julien Hagestedt Date: Thu, 11 Jun 2020 14:28:14 +0200 Subject: [PATCH] feat: secure admin console (#38) * feat: add port filter * fix: admin ui * fix: admin ui * fix: admin ui * fix: admin ui * fix: admin ui Co-authored-by: Benthin Sanguino --- .github/workflows/ci.yml | 31 - Dockerfile | 3 +- .../configuration/standalone-ha.xml | 9 + src/standalone/configuration/standalone.xml | 685 ------------------ 4 files changed, 11 insertions(+), 717 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 src/standalone/configuration/standalone.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index dd755af..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: ci -on: - push: - branches: - - master - pull_request: - types: - - opened - - synchronize - - reopened -jobs: - package: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: docker build - if: ${{ github.event_name == 'pull_request' }} - run: docker build . - - name: docker build and push - if: ${{ github.event_name == 'push' }} - run: | - export VERSION=$(git rev-parse --short ${GITHUB_SHA}) - echo ${GITHUB_TOKEN} | docker login docker.pkg.github.com -u ${GITHUB_ACTOR} --password-stdin - docker build \ - --tag docker.pkg.github.com/${GITHUB_REPOSITORY}/cwa-verification-iam:latest \ - --tag docker.pkg.github.com/${GITHUB_REPOSITORY}/cwa-verification-iam:${VERSION} \ - . - docker push docker.pkg.github.com/${GITHUB_REPOSITORY}/cwa-verification-iam:latest - docker push docker.pkg.github.com/${GITHUB_REPOSITORY}/cwa-verification-iam:${VERSION} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 5dc0ed5..abf2a8d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,11 +8,12 @@ COPY . ${WORK_DIR}/ RUN mkdir /opt/jboss/keycloak/themes/cwa RUN cp -r /opt/jboss/keycloak/themes/base/* /opt/jboss/keycloak/themes/cwa/ RUN cp -r ${WORK_DIR}/src/themes/cwa/login /opt/jboss/keycloak/themes/cwa/ -RUN cp ${WORK_DIR}/src/standalone/configuration/standalone.xml /opt/jboss/keycloak/standalone/configuration/ RUN cp ${WORK_DIR}/src/standalone/configuration/standalone-ha.xml /opt/jboss/keycloak/standalone/configuration/ EXPOSE 8080 EXPOSE 8443 +EXPOSE 7080 +EXPOSE 7443 ENTRYPOINT [ "/opt/jboss/tools/docker-entrypoint.sh" ] diff --git a/src/standalone/configuration/standalone-ha.xml b/src/standalone/configuration/standalone-ha.xml index debf782..ee97a55 100644 --- a/src/standalone/configuration/standalone-ha.xml +++ b/src/standalone/configuration/standalone-ha.xml @@ -671,10 +671,16 @@ + + + @@ -686,6 +692,7 @@ + @@ -706,6 +713,8 @@ + + diff --git a/src/standalone/configuration/standalone.xml b/src/standalone/configuration/standalone.xml deleted file mode 100644 index 3a2e999..0000000 --- a/src/standalone/configuration/standalone.xml +++ /dev/null @@ -1,685 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE - h2 - - sa - sa - - - - jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - auth - - - classpath:${jboss.home.dir}/providers/* - - - master - 900 - - 2592000 - true - true - ${env.KEYCLOAK_WELCOME_THEME:keycloak} - ${env.KEYCLOAK_DEFAULT_THEME:keycloak} - ${jboss.home.dir}/themes - - - - - - - - - - - - - jpa - - - basic - - - - - - - - - - - - - - - - - - - default - - - - - - - - ${keycloak.jta.lookup.provider:jboss} - - - - - - - - - - - ${keycloak.x509cert.lookup.provider:default} - - - - ${keycloak.hostname.provider:default} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file