Skip to content

Web Public Application for Reform IdAM (Strategic)

License

Notifications You must be signed in to change notification settings

hmcts/idam-web-public

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e39bd33 · Jul 20, 2020
May 4, 2018
Jun 8, 2020
Mar 12, 2020
May 13, 2020
Jul 20, 2020
Dec 3, 2019
Jul 20, 2020
May 10, 2018
May 13, 2020
Jun 12, 2020
Jun 10, 2020
Jun 9, 2020
Jun 29, 2020
May 4, 2018
Feb 11, 2020
Oct 17, 2019
Jun 8, 2020
Jul 14, 2020
Feb 17, 2020
Jul 20, 2020
May 13, 2020
May 13, 2020
Jul 15, 2019
Aug 13, 2018
Jun 8, 2020
Jun 8, 2020
Sep 12, 2018
Mar 12, 2020
Jun 10, 2020
May 8, 2018
Dec 3, 2019
Jun 8, 2020
Jun 8, 2020

Repository files navigation

IdAM Web Public

IdAM Web Public is a Spring Boot web application that provides the public facing UI for Reform IdAM. This includes: login and sign-up page, page for requesting password reset.

Getting started

Prerequisites

Building

The project uses Gradle as a build tool but you don't have install it locally since there is a ./gradlew wrapper script.

To build project please execute the following command:

$ ./gradlew build

Developing

Unit tests

To run all unit tests please execute the following command:

$ ./gradlew test

Coding style tests

To run all checks (including unit tests) please execute the following command:

$ ./gradlew check

Docker

Required tools for macOS

  • docker (homebrew cask)

Build

docker build -t hmcts/idam-web-public:<tag> .

Run Interactively

# Running a temporary container?
docker run --rm -it -e STRATEGIC_SERVICE_URL=http://<local-idam-api-hostname> --entrypoint /bin/sh hmcts/idam-web-public:<tag>
# Is the container already running?
docker exec -it <hmcts/idam-web-public:<tag> /bin/sh

Run as Daemon

See the webapps docker-compose.yml file. Docker compose expects the image to tag to be local.

docker-compose up

Docker Compose Notes

Expected error: Access denied. ForgeRock connection is not yet implemented. Please use the following URI to obtain the the security code page.

http://localhost:18002/login/pin?client_id=tstsrv456&redirect_uri=http://localhost:8084/ui/login

AKS Troubleshooting Mode

Use the /configprops & /env endpoints to learn more about the target configuration. To bypass sanitisation, use either of the implemtations below.

# application.yaml
management:
  security:
    enabled: false
  endpoint:
    configprops:
      keys-to-sanitize:
        - nothing
    env:
     keys-to-sanitize:
        - nothing
  endpoints:
    web:
      base-path: /
      exposure:
        include: health,info,configprops,env
    ...

# values.yaml
  ...
  environment:
    MANAGEMENT_ENDPOINT_CONFIGPROPS_KEYS-TO-SANITIZE_0: nothing
    MANAGEMENT_ENDPOINT_ENV_KEYS-TO-SANITIZE_0: nothing
    MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE: health,info,configprops,env
  ...

# K8s manifest
        - name: MANAGEMENT_ENDPOINT_CONFIGPROPS_KEYS-TO-SANITIZE_0
          value: nothing
        - name: MANAGEMENT_ENDPOINT_ENV_KEYS-TO-SANITIZE_0
          value: nothing
        - name: MANAMANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE
          value: health,info,configprops,env

Pipeline Overrides

You can add similar callbacks to the below to override the environment values and set testing variables.

withPipeline(type, product, component) {
  ...
  before('smoketest-aks:idam-preview') {
    env.PREVIEW_ENVIRONMENT_NAME = 'preview'   
    env.NONPROD_ENVIRONMENT_NAME = 'aat'
    env.PUBLIC_URL = 'https://idam-web-public-pr-207.service.core-compute-preview.internal'
    println """Using PREVIEW_ENVIRONMENT_NAME: ${env.PREVIEW_ENVIRONMENT_NAME}
               Using NONPROD_ENVIRONMENT_NAME: ${env.NONPROD_ENVIRONMENT_NAME}
               Using PUBLIC_URL: ${env.PUBLIC_URL}""".stripIndent()
  }
  ...
}

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.