github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/cmd/scopessynchronizer/README.md (about)

     1  # Scopes Synchronizer Job
     2  
     3  ## Overview
     4  
     5  The role of the Scopes Synchronizer Job is to synchronize the scopes of OAuth clients in Hydra, which are created for a given consumer type. The synchronization is required when there is a change in the consumer scopes, such as, granting additional scopes or removing given scopes.
     6  
     7  ## Details
     8  
     9  The basic workflow of Scopes Synchronizer is as follows:
    10  
    11  1. List all clients available in ORY Hydra
    12  2. List all system auths with OAuths (should be 1:1 mapping with above clients)
    13  3. Based on the system auth entry consumer type (application, runtime, integration system) update the client in Hydra with the required scopes taken from the [Director scopes configuration](../../../../chart/compass/charts/director/config.yaml).
    14  
    15  ## Configuration
    16  
    17  The Scopes Synchronizer binary allows you to override some configuration parameters. To get a list of the configurable parameters, see [main.go](https://github.com/kyma-incubator/compass/blob/8a8ecb2fcf3a38f8f6392f5669b98c1a10342363/components/director/cmd/scopessynchronizer/main.go#L27).
    18  
    19  ## Local Development
    20  ### Prerequisites
    21  The Scopes Synchronizer requires access to:
    22  1. Configured PostgreSQL database with the imported Director's database schema.
    23  1. Up and running ORY Hydra.
    24  
    25  ### Run
    26  This component requires ORY Hydra and for this reason its local run is cumbersome. It is recommended to start a local k3d installation and deploy Compass on it. The Scopes Synchronizer job is a post-install job that runs at the end of the Helm installation.