Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INJICERT-13] move feature branch changes to develop #17

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/keys/mosipgpgkey_pub.gpg
Binary file not shown.
Binary file added .github/keys/mosipgpgkey_sec.gpg
Binary file not shown.
62 changes: 62 additions & 0 deletions .github/workflows/chart-lint-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Validate / Publish helm charts

on:
release:
types: [published]
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'charts/**'
workflow_dispatch:
inputs:
IGNORE_CHARTS:
description: 'Provide list of charts to be ignored separated by pipe(|)'
required: false
default: ''
type: string
CHART_PUBLISH:
description: 'Chart publishing to gh-pages branch'
required: false
default: 'NO'
type: string
options:
- YES
- NO
INCLUDE_ALL_CHARTS:
description: 'Include all charts for Linting/Publishing (YES/NO)'
required: false
default: 'NO'
type: string
options:
- YES
- NO
push:
branches:
- '!release-branch'
- master
- 1.*
- 0.*
- develop
- MOSIP*
- release*
paths:
- './helm/**'

jobs:
chart-lint-publish:
uses: mosip/kattu/.github/workflows/chart-lint-publish.yml@master
with:
CHARTS_DIR: ./helm
CHARTS_URL: https://mosip.github.io/mosip-helm
REPOSITORY: mosip-helm
BRANCH: gh-pages
INCLUDE_ALL_CHARTS: "${{ inputs.INCLUDE_ALL_CHARTS || 'NO' }}"
IGNORE_CHARTS: "${{ inputs.IGNORE_CHARTS ||'redis' }}"
CHART_PUBLISH: "${{ inputs.CHART_PUBLISH || 'YES' }}"
LINTING_CHART_SCHEMA_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/chart-schema.yaml"
LINTING_LINTCONF_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/lintconf.yaml"
LINTING_CHART_TESTING_CONFIG_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/chart-testing-config.yaml"
LINTING_HEALTH_CHECK_SCHEMA_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/health-check-schema.yaml"
secrets:
TOKEN: ${{ secrets.ACTION_PAT }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
87 changes: 87 additions & 0 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Maven Package upon a push

on:
release:
types: [published]
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
inputs:
message:
description: 'Message for manually triggering'
required: false
default: 'Triggered for Updates'
type: string
push:
branches:
- '!release-branch'
- master
- 1.*
- develop
- MOSIP*
- release*
- INJICERT-13

jobs:
build-maven-inji-certify:
uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21
with:
SERVICE_LOCATION: ./
BUILD_ARTIFACT: inji-certify
secrets:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

publish_to_nexus:
if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}"
needs: build-maven-inji-certify
uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21
with:
SERVICE_LOCATION: ./
secrets:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
OSSRH_URL: ${{ secrets.OSSRH_SNAPSHOT_URL }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}


build-dockers:
needs: build-maven-inji-certify
strategy:
matrix:
include:
- SERVICE_LOCATION: 'certify-service'
SERVICE_NAME: 'inji-certify'
BUILD_ARTIFACT: 'inji-certify'
fail-fast: false
name: ${{ matrix.SERVICE_NAME }}
uses: mosip/kattu/.github/workflows/docker-build.yml@master-java21
with:
SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
SERVICE_NAME: ${{ matrix.SERVICE_NAME }}
BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }}
secrets:
DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }}
ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }}
RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

sonar_analysis:
needs: build-maven-inji-certify
if: "${{ github.event_name != 'pull_request' }}"
uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master-java21
with:
SERVICE_LOCATION: ./
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
ORG_KEY: ${{ secrets.ORG_KEY }}
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
29 changes: 29 additions & 0 deletions .github/workflows/release-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release/pre-release Preparation.

on:
workflow_dispatch:
inputs:
MESSAGE:
description: 'Triggered for release or pe-release'
required: false
default: 'Release Preparation'
RELEASE_TAG:
description: 'tag to update'
required: true
SNAPSHOT_TAG:
description: 'tag to be replaced'
required: true
BASE:
description: 'base branch for PR'
required: true
jobs:
maven-release-preparation:
uses: mosip/kattu/.github/workflows/release-changes.yml@master
with:
MESSAGE: ${{ inputs.MESSAGE }}
RELEASE_TAG: ${{ inputs.RELEASE_TAG }}
SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }}
BASE: ${{ inputs.BASE }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
ACTION_PAT: ${{ secrets.ACTION_PAT }}
53 changes: 53 additions & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tagging of repos

on:
workflow_dispatch:
inputs:
TAG:
description: 'Tag to be published'
required: true
type: string
BODY:
description: 'Release body message'
required: true
default: 'Changes in this Release'
type: string
PRE_RELEASE:
description: 'Pre-release? True/False'
required: false
default: 'false'
type: string
DRAFT:
description: 'Draft? True/False'
required: false
default: 'false'
type: string
ONLY_TAG:
description: "Only Tag"
required: false
type: string
default: 'false'
BRANCH:
description: 'Branch name'
required: true
type: string
LATEST:
description: 'Latest release'
required: false
type: string
default: 'true'

jobs:
tag-branch:
uses: mosip/kattu/.github/workflows/tag.yml@master
with:
TAG: ${{ inputs.TAG }}
BODY: ${{ inputs.BODY }}
PRE_RELEASE: ${{ inputs.PRE_RELEASE }}
DRAFT: ${{ inputs.DRAFT }}
ONLY_TAG: ${{ inputs.ONLY_TAG }}
BRANCH: ${{ inputs.BRANCH }}
LATEST: ${{ inputs.LATEST }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
TOKEN: ${{ secrets.ACTION_PAT }}
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# other directories
target/
.idea/
*.p12
*.iml
.settings/
.setting/
.mvn/
.project/
helm/*/Chart.lock
helm/*/charts/
65 changes: 44 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Execute installation script

```
1. Sunbird RC
2. Esignet
2. Certify
0. Exit
Select:
```
Expand All @@ -45,33 +45,56 @@ Execute installation script
* Set the hostname of the endpoints correctly as per your docker setup
* Now generate a DID, create a credential schema and create an issuance registry
* take note of `$.schema[0].author` and `$.schema[0].id` from the create credential schema request
6. Add the jar file of Digital Credential Stack(DCS) plugin implementation in [loader_path](docker-compose-esignet/loader_path). The JAR can be built [from source](https://github.com/mosip/digital-credential-plugins/) or [downloaded directly](https://mvnrepository.com/artifact/io.mosip.esignet.sunbirdrc/sunbird-rc-esignet-integration-impl).
7. Modify the properties of the Esignet service located in the [esignet-default.properties](docker-compose-esignet/config/esignet-default.properties) file:
- Include Issuer ID and credential schema ID for the following properties: `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.static-value-map.issuerId`, `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential-type}.cred-schema-id`.
6. Add the jar file of Digital Credential Stack(DCS) plugin implementations for eSignet and certify:
* For eSignet add the jar file [here](docker-compose/docker-compose-certify/loader_path/esignet). The JAR can be built [from source](https://github.com/mosip/digital-credential-plugins/) or [downloaded directly](https://mvnrepository.com/artifact/io.mosip.esignet.sunbirdrc/sunbird-rc-esignet-integration-impl).
* For certify add the jar file [here](docker-compose/docker-compose-certify/loader_path/certify). THE JAR can be built [from source](https://github.com/mosip/digital-credential-plugins/tree/INJICERT-13/sunbird-rc-certify-integration-impl).
7. Modify the properties of the Esignet and Certify services located in the [esignet-default.properties](docker-compose/docker-compose-certify/config/esignet-default.properties) and [certify-default.properties](docker-compose/docker-compose-certify/config/certify-default.properties) files respectively.
- Include Issuer ID and credential schema ID for the following properties:
- esignet-default-properties:
- `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.static-value-map.issuerId`.
- `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential-type}.cred-schema-id`.
- certify-default.properties:
- `mosip.certify.vciplugin.sunbird-rc.credential-type.{credential type}.static-value-map.issuerId`.
- `mosip.certify.vciplugin.sunbird-rc.credential-type.{credential-type}.cred-schema-id`.
- The `$.schema[0].author` DID goes to the config ending in issuerId and `$.schema[0].id` DID goes to the config ending in `cred-schema-id`.
8. Once the Esignet properties are configured, proceed to select Esignet from the options provided for eSignet.
9. Download the postman collection and environment for sunbird use case from [here](https://github.com/mosip/digital-credential-plugins/tree/master/sunbird-rc-esignet-integration-impl/postman-collections).
10. Create Client from Create OIDC client API, add redirect uri 'http://localhost:3001', add auth-factor 'mosip:idp:acr:knowledge' to the request body.
11. Change `aud` variable in environment to 'http://localhost:8088/v1/esignet/oauth/v2/token' and set `audUrl` to http://localhost:8088
12. Perform a Knowledge based authentication(KBA) as specified in the Postman collection.
8. Once the Esignet and Certify properties are configured, proceed to select Certify from the option provided in the installation steps.
9. The installation of Certify will encompass the following services:
* [Esignet Service](https://github.com/mosip/esignet)
* [Certify Service](https://github.com/mosip/inji-certify)
10. Download the postman collection and environment for sunbird use case from [here](docker-compose/docker-compose-certify/postman-collections).
11. Create Client from Create OIDC client API, add redirect uri 'http://localhost:3001'.
12. Change `aud` variable in environment to 'http://localhost:8088/v1/esignet/oauth/v2/token' and set `audUrl` to http://localhost:8088
13. Perform a Knowledge based authentication(KBA) as specified in the Postman collection.
* perform the authorize callback request
* in the /authorization/authenticate request update the challenge to a URL-safe base64 encoded string with the KBA details such as `{"fullName":"Abhishek Gangwar","dob":"1967-10-24"}`, one can use an [online base64 encoding service](https://base64encode.org) for the same.
* in the /vci/credential api inside pre-request script section change the aud env variable to -> "aud" : pm.environment.get('audUrl')
* in the /issuance/credential api inside pre-request script section change the aud env variable to -> "aud" : pm.environment.get('audUrl')

## Properties for custom use case

- Sample schemas for Insurance registry are provided [here](docker-compose-sunbird/schemas), change it according to use case.
- Sample schemas for Insurance registry are provided [here](docker-compose/docker-compose-sunbird/schemas), change it according to use case.
- Change these properties for different use case `mosip.esignet.authenticator.sunbird-rc.auth-factor.kba.field-details`,`mosip.esignet.authenticator.sunbird-rc.auth-factor.kba.individual-id-field`
- Add the Sunbird registry URL for these properties: `mosip.esignet.vciplugin.sunbird-rc.issue-credential-url`,`mosip.esignet.authenticator.sunbird-rc.auth-factor.kba.registry-search-url`.
- Specify the list of supported credential types using the property: `mosip.esignet.vciplugin.sunbird-rc.supported-credential-types`.
- For each supported credential type change the below properties. Sample properties are provided in the [default properties](docker-compose-esignet/config/esignet-default.properties) file.
* Issuer id `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.static-value-map.issuerId`
* Credential schema id `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.cred-schema-id`
* Registry Url `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.registry-get-url`
* Template Url `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.template-url`
* Credential schema version `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.cred-schema-version`
- Define the list of supported scopes using: `mosip.esignet.supported.credential.scopes`, and for each scope, map the resource accordingly at `mosip.esignet.credential.scope-resource-mapping`.
- Change this property for different credential types supported `mosip.esignet.vci.key-values` based on OID4VCI version.
- Specify the list of supported credential types for these properties:
- esignet-default-properties:
- `mosip.esignet.vciplugin.sunbird-rc.supported-credential-types`.
- certify-default.properties:
- `mosip.certify.vciplugin.sunbird-rc.supported-credential-types`.
- For each supported credential type change the below properties. Sample properties are provided in the [eSignet default properties](docker-compose/docker-compose-certify/config/esignet-default.properties) and [Certify default properties](docker-compose/docker-compose-certify/config/certify-default.properties).
* esignet-default-properties:
* Issuer id `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.static-value-map.issuerId`
* Credential schema id `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.cred-schema-id`
* Registry Url `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.registry-get-url`
* Template Url `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.template-url`
* Credential schema version `mosip.esignet.vciplugin.sunbird-rc.credential-type.{credential type}.cred-schema-version`
* Define the list of supported scopes using: `mosip.esignet.supported.credential.scopes`, and for each scope, map the resource accordingly at `mosip.esignet.credential.scope-resource-mapping`.
* Change these properties for different credential types supported `mosip.esignet.vci.key-values` based on OID4VCI version.
* certify-default-properties:
* Issuer id `mosip.certify.vciplugin.sunbird-rc.credential-type.{credential type}.static-value-map.issuerId`
* Credential schema id `mosip.certify.vciplugin.sunbird-rc.credential-type.{credential type}.cred-schema-id`
* Registry Url `mosip.certify.vciplugin.sunbird-rc.credential-type.{credential type}.registry-get-url`
* Template Url `mosip.certify.vciplugin.sunbird-rc.credential-type.{credential type}.template-url`
* Credential schema version `mosip.certify.vciplugin.sunbird-rc.credential-type.{credential type}.cred-schema-version`
* Change these properties for different credential types supported `mosip.certify.key-values` based on OID4VCI version.

## Troubleshooting

Expand All @@ -87,4 +110,4 @@ Execute installation script
* [Registry](https://github.com/challabeehyv/sunbird-devops/tree/main/deploy-as-code/helm/demo-mosip-registry)
* [Credential service, Credential schema service & Identity service](https://github.com/Sunbird-RC/devops/tree/main/deploy-as-code/helm/v2)
* [Vault](https://github.com/challabeehyv/sunbird-devops/blob/main/deploy-as-code/helm/v2/README.md#vault-deployment)
* [Esignet](https://github.com/mosip/esignet/tree/develop/helm)
* [Esignet](https://github.com/mosip/esignet/tree/develop/helm)
Loading
Loading