Giter Club home page Giter Club logo

dp-identity-api's Introduction

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 variable Default Description
BIND_ADDR :25600 The host and port to bind to
GRACEFUL_SHUTDOWN_TIMEOUT 20s The graceful shutdown timeout in seconds (time.Duration format)
HEALTHCHECK_INTERVAL 30s Time between self-healthchecks (time.Duration format)
HEALTHCHECK_CRITICAL_TIMEOUT 90s Time to wait until an unhealthy dependent propagates its state to make this app unhealthy (time.Duration format)
AWS_REGION eu-west-2 The 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
MessageAction RESEND A 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.

dp-identity-api's People

Contributors

mwnicks avatar awitcherons avatar mike-kelly-methods avatar hejones avatar marianasilvago avatar gedge avatar pidah avatar andre-urbani avatar nshumoogum avatar lindenmckenzie avatar sandypadmanabhan avatar dionisislolas avatar janderson2 avatar jessjenkins avatar daillew avatar redhug1 avatar chrysmore avatar carlhembrough avatar hareshkainthmethods avatar stmuk avatar barathaaberathne avatar dandwal avatar jon-acker avatar russ-davey avatar mr-nick17 avatar rafahop avatar

Stargazers

Pritesh Patel avatar

Watchers

Lucian avatar  avatar James Cloos avatar  avatar P T Weir avatar Mark Bradley avatar  avatar Dan Weinberg avatar Rahul Palliyalil avatar Eleanor Deal avatar  avatar thomasodus avatar Brian Quinn avatar  avatar Martyn Spooner avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.