Skip to content

Commit

Permalink
Merge pull request #173 from commercetools/kinghin.leung/remove-ctp-s…
Browse files Browse the repository at this point in the history
…cope

fix(all): remove CTP_SCOPE
  • Loading branch information
leungkinghin-ct authored Apr 12, 2024
2 parents 321ce34 + b08f162 commit ef28547
Show file tree
Hide file tree
Showing 6 changed files with 10,062 additions and 22 deletions.
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This repository provides a [connect](https://docs.commercetools.com/connect) tem

## Prerequisite
#### 1. commercetools composable commerce API client
Users are expected to create API client responsible for payment management in composable commerce project. Details of the API client are taken as input as environment variables/ configuration for connect such as `CTP_PROJECT_KEY` , `CTP_CLIENT_ID`, `CTP_CLIENT_SECRET`, `CTP_SCOPE`. For details, please read [Deployment Configuration](./README.md#deployment-configuration).
Users are expected to create API client responsible for payment management in composable commerce project. Details of the API client are taken as input as environment variables/ configuration for connect such as `CTP_PROJECT_KEY` , `CTP_CLIENT_ID`, `CTP_CLIENT_SECRET`. For details, please read [Deployment Configuration](./README.md#deployment-configuration).
In addition, please make sure the API client should have enough scope to be able to manage payment. For details, please refer to [Running Application](./processor/README.md#running-application)

#### 2. various URLs from commercetools composable commerce
Expand Down Expand Up @@ -50,41 +50,50 @@ In addition, in order to support connect, the tax integration connector template
Connect deployment configuration is specified in `connect.yaml` which is required information needed for publishing of the application. Following is the deployment configuration used by Enabler and Processor modules
```
deployAs:
- name: enabler
applicationType: assets
- name: processor
applicationType: service
endpoint: /
configuration:
standardConfiguration:
- key: CTP_PROJECT_KEY
description: Commercetools project key
description: commercetools project key
required: true
- key: CTP_CLIENT_ID
description: Commercetools client ID
- key: CTP_SCOPE
description: Commercetools client scope
description: commercetools client ID
required: true
- key: CTP_AUTH_URL
description: Commercetools Auth URL
description: commercetools Auth URL
required: true
default: https://auth.europe-west1.gcp.commercetools.com
- key: CTP_API_URL
description: Commercetools API URL
description: commercetools API URL
required: true
default: https://api.europe-west1.gcp.commercetools.com
- key: CTP_SESSION_URL
description: Session API URL
required: true
default: https://session.europe-west1.gcp.commercetools.com
- key: CTP_JWKS_URL
description: JWKs url
required: true
default: https://mc-api.europe-west1.gcp.commercetools.com/.well-known/jwks.json
- key: CTP_JWT_ISSUER
description: JWT Issuer for jwt validation
required: true
securedConfiguration:
- key: CTP_CLIENT_SECRET
description: Commercetools client secret
- name: enabler
applicationType: assets
description: commercetools client secret
required: true
```

Here you can see the details about various variables in configuration
- `CTP_PROJECT_KEY`: The key of commercetools composable commerce project.
- `CTP_CLIENT_ID`: The client ID of your commercetools composable commerce user account. It is used in commercetools client to communicate with commercetools composable commerce via SDK.
- `CTP_CLIENT_SECRET`: The client secret of commercetools composable commerce user account. It is used in commercetools client to communicate with commercetools composable commerce via SDK.
- `CTP_SCOPE`: The scope constrains the endpoints to which the commercetools client has access, as well as the read/write access right to an endpoint.
- `CTP_AUTH_URL`: The URL for authentication in commercetools platform. It is used to generate OAuth 2.0 token which is required in every API call to commercetools composable commerce. The default value is `https://auth.europe-west1.gcp.commercetools.com`. For details, please refer to documentation [here](https://docs.commercetools.com/tutorials/api-tutorial#authentication).
- `CTP_API_URL`: The URL for commercetools composable commerce API. Default value is `https://api.europe-west1.gcp.commercetools.com`.
- `CTP_SESSION_URL`: The URL for session creation in commercetools platform. Connectors relies on the session created to be able to share information between enabler and processor. The default value is `https://session.europe-west1.gcp.commercetools.com`.
- `CTP_JWKS_URL`: The URL which provides JSON Web Key Set.
- `CTP_JWKS_URL`: The URL which provides JSON Web Key Set. Default value is `https://mc-api.europe-west1.gcp.commercetools.com/.well-known/jwks.json`
- `CTP_JWT_ISSUER`: The issuer inside JSON Web Token which is required in JWT validation process.
3 changes: 0 additions & 3 deletions connect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ deployAs:
- key: CTP_CLIENT_ID
description: commercetools client ID
required: true
- key: CTP_SCOPE
description: commercetools client scope
required: true
- key: CTP_AUTH_URL
description: commercetools Auth URL
required: true
Expand Down
Loading

0 comments on commit ef28547

Please sign in to comment.