-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ckm007 <[email protected]>
- Loading branch information
Showing
28 changed files
with
936 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,10 @@ | ||
## Overview | ||
|
||
This is the docker-compose setup to run esignet UI and esignet-service with mock identity system. This is not for production use. | ||
This is the docker-compose setup to run eSignet Signup service with mock identity system. This is not for production use. | ||
|
||
## What is in the docker-compose setup folder? | ||
|
||
1. "app" folder holds the Dockerfile required to build custom artifactory-server. This artifactory server will host all the files under app/static folder. | ||
All the i18n bundles, dummy softhsm conf, signin-with-esignet button plugin files are served from this server. | ||
2. "config" folder holds the esignet and mock-identity system properties file. | ||
3. "docker-compose.yml" file with esignet and mock-identity-system setup with other required services | ||
4. "init.sql" comprises DDL and DMLs required by esignet and mock-identity-system. | ||
5. "loader_path" this is esignet mount volume from where all the runtime dependencies are loaded to classpath. If any new esignet plugins to be tested | ||
should be placed in this folder and respective plugin configuration should be updated in config/esignet-default.properties. | ||
|
||
```Note: Refer https://docs.esignet.io/integration to know how to create custom plugins to integrate.``` | ||
|
||
## How to run this setup? | ||
|
||
1. Create loader_path folder in the same directory and Download the eisgnet mock plugin from [here](https://repo1.maven.org/maven2/io/mosip/esignet/mock/mock-esignet-integration-impl/0.9.2/mock-esignet-integration-impl-0.9.2.jar) | ||
and copy the downloaded jar under loader_path directory. | ||
|
||
2. Start the docker-compose file | ||
|
||
> docker-compose up | ||
3. Download the postman script from [here](../docs/postman-collections/esignet-with-mock-IDA.postman_collection.json) | ||
and its environment from [here](../docs/postman-collections/esignet-with-mock-IDA.postman_environment.json) | ||
|
||
4. Import the downloaded collection and environment into postman. | ||
|
||
5. To create an OIDC/OAuth client, run the below request from the postman collection "OIDC Client mgmt" folder | ||
* Get CSRF token | ||
* Create OIDC Client | ||
|
||
6. To Create a Mock identity, run the below request from the postman collection "Mock-Identity-System" folder | ||
* Create Mock Identity | ||
|
||
7. To run the OIDC flow with mock identity run the below request(same order) from the postman collection "AuthCode flow with OTP login" folder. | ||
* Get CSRF token | ||
* Authorize / OAuthdetails request | ||
* Send OTP | ||
* Authenticate User | ||
* Authorization Code | ||
* Get Tokens | ||
* Get userInfo | ||
|
||
8. To run the Verifiable Credential Issuance flow with mock identity run the below request(same order) from the postman collection "VCI" folder. | ||
* Get CSRF token | ||
* Authorize / OAuthdetails request | ||
* Send OTP | ||
* Authenticate User | ||
* Authorization Code | ||
* Get Tokens | ||
* Get Credential | ||
|
||
|
||
## How to Access esignet UI? | ||
|
||
To invoke the authorize endpoint of esignet UI to start OIDC/VCI flow, use the below URL: | ||
|
||
http://localhost:3000/authorize?nonce=ere973eieljznge2311&state=eree2311&client_id=health-service-client&redirect_uri=https://healthservices.com/callback&scope=openid&response_type=code&acr_values=mosip:idp:acr:generated-code&claims=%7B%22userinfo%22:%7B%22name%22:%7B%22essential%22:false%7D,%22phone_number%22:%7B%22essential%22:true%7D%7D,%22id_token%22:%7B%7D%7D&claims_locales=en&display=page&state=consent&ui_locales=en-IN | ||
|
||
```Note: Change the value of client_id, redirect_uri, acr_values and claims as per your requirement in the above URL.``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
services: | ||
database: | ||
image: 'postgres:bookworm' | ||
ports: | ||
- 5455:5432 | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
volumes: | ||
- ./init.sql:/docker-entrypoint-initdb.d/init.sql | ||
|
||
mock-identity-system: | ||
image: 'mosipdev/mock-identity-system:develop' | ||
user: root | ||
ports: | ||
- 8082:8082 | ||
environment: | ||
- container_user=mosip | ||
- active_profile_env=local | ||
- SPRING_DATASOURCE_URL=jdbc:postgresql://database:5432/mosip_mockidentitysystem?currentSchema=mockidentitysystem | ||
- SPRING_DATASOURCE_USERNAME=postgres | ||
- SPRING_DATASOURCE_PASSWORD=postgres | ||
depends_on: | ||
- database | ||
|
||
zookeeper: | ||
image: wurstmeister/zookeeper | ||
container_name: zookeeper | ||
ports: | ||
- "2181:2181" | ||
|
||
kafka: | ||
image: wurstmeister/kafka | ||
container_name: kafka | ||
ports: | ||
- "9092:9092" | ||
environment: | ||
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9092,OUTSIDE://localhost:9093 | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT | ||
KAFKA_LISTENERS: INSIDE://0.0.0.0:9092,OUTSIDE://0.0.0.0:9093 | ||
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE | ||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | ||
|
||
esignet: | ||
image: 'mosipdev/esignet:develop' | ||
user: root | ||
ports: | ||
- 8088:8088 | ||
environment: | ||
- container_user=mosip | ||
- active_profile_env=local | ||
- plugin_name_env=esignet-mock-plugin.jar | ||
- KAFKA_ENABLED=false | ||
- SPRING_AUTOCONFIGURE_EXCLUDE=org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration | ||
- SPRING_DATASOURCE_URL=jdbc:postgresql://database:5432/mosip_esignet?currentSchema=esignet | ||
- SPRING_CACHE_TYPE=simple | ||
- MOSIP_ESIGNET_MOCK_DOMAIN_URL=http://mock-identity-system:8082 | ||
depends_on: | ||
- database | ||
- mock-identity-system | ||
|
||
esignet-ui: | ||
image: 'mosipdev/oidc-ui:develop' | ||
user: root | ||
ports: | ||
- 3000:3000 | ||
environment: | ||
- container_user=mosip | ||
- DEFAULT_WELLKNOWN=%5B%7B%22name%22%3A%22OpenID%20Configuration%22%2C%22value%22%3A%22%2F.well-known%2Fopenid-configuration%22%7D%2C%7B%22name%22%3A%22Jwks%20Json%22%2C%22value%22%3A%22%2F.well-known%2Fjwks.json%22%7D%2C%7B%22name%22%3A%22Authorization%20Server%22%2C%22value%22%3A%22%2F.well-known%2Foauth-authorization-server%22%7D%5D | ||
- SIGN_IN_WITH_ESIGNET_PLUGIN_URL=https://raw.githubusercontent.com/mosip/artifactory-ref-impl/master/artifacts/src/mosip-plugins/sign-in-with-esignet/sign-in-with-esignet.zip | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf | ||
depends_on: | ||
- esignet | ||
|
||
signup: | ||
image: 'mosipdev/signup-service:develop' | ||
user: root | ||
ports: | ||
- 8089:8089 | ||
environment: | ||
- container_user=mosip | ||
- active_profile_env=local | ||
- plugin_name_env=esignet-mock-plugin.jar | ||
- MOSIP_ESIGNET_MOCK_DOMAIN_URL=http://mock-identity-system:8082 | ||
depends_on: | ||
- database | ||
- mock-identity-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.