Categorygithub.com/ONSdigital/dp-identity-api
modulepackage
1.56.0
Repository: https://github.com/onsdigital/dp-identity-api.git
Documentation: pkg.go.dev

# README

dp-identity-api

An API used to manage the authorisation of users accessing data publishing services.

Getting started

Run make debug to get started

To run the app with reflex and have it restart when you make changes, run:

make debug-watch

Dummy data

If test data is required in the local Cognito user pool:

  • Run make populate-local

To remove create test data from Cognito user pool:

  • Run make remove-test-data

Dependencies

  • No further dependencies other than those defined in go.mod

Configuration

Environment variableDefaultDescription
BIND_ADDR:25600The host and port to bind to
GRACEFUL_SHUTDOWN_TIMEOUT20sThe graceful shutdown timeout in seconds (time.Duration format)
HEALTHCHECK_INTERVAL30sTime between self-healthchecks (time.Duration format)
HEALTHCHECK_CRITICAL_TIMEOUT90sTime to wait until an unhealthy dependent propagates its state to make this app unhealthy (time.Duration format)
AWS_REGIONeu-west-2The default AWS region for the identity api service
AWS_COGNTIO_USER_POOL_ID-The ID of the user pool to be used
AWS_COGNITO_CLIENT_ID-Cognito client ID
AWS_COGNITO_CLIENT_SECRET-Cognito client secret
AWS_AUTH_FLOW-A parameter to define the request to the InitiateAuth endpoint in cognito
MessageActionRESENDA feature flag to SUPPRESS or RESEND message action on creating a new user
HTTP_WRITE_TIMEOUT[^dpnet]How long the dispatcher waits for us to write to it (time.Duration format)

[^dpnet] dp-net default

To get the values for the other AWS Cognito secrets:

  • AWS_COGNITO_USER_POOL_ID get from AWS > Cognito > User Pools > user pool ID
  • AWS_COGNITO_CLIENT_ID get from AWS > Cognito > User Pools > App Integration > App clients > dp-identity-api > client id
  • AWS_COGNITO_CLIENT_SECRET get from AWS > Cognito > User Pools > App Integration > App clients > dp-identity-api > client secret

Configuration needed to import user and group from s3

export GroupsFilename=""
export GroupUsersFilename=""
export UserFileName=""
export S3Bucket=""
export S3BaseDir=""
export S3Region=""
export AWSCognitoUserPoolID=""

Contributing

See CONTRIBUTING for details.

License

Copyright © 2024, Office for National Statistics

Released under MIT license, see LICENSE for details.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

BuildTime represents the time in which the service was built.
GitCommit represents the commit (SHA-1) hash of the service that is running.
Version represents the version of the service that is running.