Skip to content

Commit

Permalink
[INJIMOB-2712]: Merge release 1.1.x changes into develop branch (#75)
Browse files Browse the repository at this point in the history
* [INJIMBO-2324] Adding issuance date tolerance and logger update. (#58)

* [INJIMOB-2311]: Update Issuance date validation with tolerance of 3sec. (#56)

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2324]: Update org.sl4j Logger to java.util.logging Logger. (#57)

* [INJIMOB-2324]: Update org.sl4j Logger to java.util.logging Logger.

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2324]: Remove Local util Logger and directly using the log level methods available in java.util.logging.

Signed-off-by: BalachandarG <[email protected]>

---------

Signed-off-by: BalachandarG <[email protected]>

---------

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2324]: Adding 3 sec tolerance to  date fields. (#60)

* [INJIMOB-2324]: Adding 3 sec tolerance to dates in Mdoc Validator.

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2324]: Combine future extension methos into single method and test cases updated.

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2324]: Hanlding tolerance in validFrom date of Data Model 2.0

Signed-off-by: BalachandarG <[email protected]>

---------

Signed-off-by: BalachandarG <[email protected]>

* Adding sonar again to the pipeline (#62)

Signed-off-by: Gurpreet41082 <[email protected]>

* [INJIMOB-2580]: Refactor tests to read test data from file. (#63)

Co-authored-by:Alka Prasad <[email protected]>

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-1862] update readme with mdoc verification limitations (#64)

Signed-off-by: KiruthikaJeyashankar <[email protected]>

* [INJIMOB-2712]: Addressing Review Comments on codebase (#67)

* [INJIMOB-2712]: Remove js package and vc-verifier tool

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2712] : Refactor Data classes.

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2712]: Refactor expiry date condition

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2712]: Update root level Readme.

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2712]: Update Read me.

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2712] : Revert-Refactor Data classes.

This reverts commit cd77ac6.

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2712]: Reverting - Refactor expiry date condition

This reverts commit 0ccfe2e.

Signed-off-by: BalachandarG <[email protected]>

---------

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOb-2712]: Update readme for data classes

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2712] modify sonar workflow to gradle (#69)

Signed-off-by: KiruthikaJeyashankar <[email protected]>

* [INJIMOb-2712]: Read me updates (#73)

* [INJIMOB-2712]: Update read me for integrating with Maven Project

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2712]: Update read me with resolution strategy.

Signed-off-by: BalachandarG <[email protected]>

---------

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2712]: Update Test Data in Example Project

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2712] add sonar job as push trigger (#77)

Signed-off-by: KiruthikaJeyashankar <[email protected]>

---------

Signed-off-by: BalachandarG <[email protected]>
Signed-off-by: Gurpreet41082 <[email protected]>
Signed-off-by: KiruthikaJeyashankar <[email protected]>
Co-authored-by: Gurpreet41082 <[email protected]>
Co-authored-by: KiruthikaJeyashankar <[email protected]>
Co-authored-by: Vishwa <[email protected]>
  • Loading branch information
4 people authored Jan 24, 2025
1 parent 6ca5d80 commit 0459557
Show file tree
Hide file tree
Showing 36 changed files with 205 additions and 6,471 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,14 @@ jobs:
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}

# sonar_analysis:
# needs: build-maven-vc-verifier
# if: "${{ github.event_name != 'pull_request' }}"
# uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master-java21
# with:
# SERVICE_LOCATION: vc-verifier/kotlin/vcverifier
# 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_INJI_TEAM }}
sonar_analysis:
needs: build-maven-vc-verifier
if: "${{ github.event_name != 'pull_request' }}"
uses: mosip/kattu/.github/workflows/gradlew-sonar-analysis.yml@master-java21
with:
SERVICE_LOCATION: vc-verifier/kotlin/vcverifier
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_ORGANIZATION: ${{ secrets.ORG_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}

109 changes: 108 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,108 @@
# vc-verifier

# vc-verifier

**VC Verifier Library** is a comprehensive Java/Kotlin library designed to enable the validation and verification of **Verifiable Credentials (VCs)**, a crucial component in modern decentralized identity systems. This library provides a robust mechanism for verifying the authenticity and integrity of VCs, ensuring that the claims made within the credential are both valid and trustworthy.

#### Key Features:

- **VC Validation**: The library validates the structure, signatures, and expiration of Verifiable Credentials to ensure they conform to the W3C VC standards.
- **Cryptographic Signature Verification**: Supports the verification of cryptographic signatures using public keys, including EdDSA, RSA, and other supported algorithms, ensuring the integrity of the credential.
- **Compatibility with Various Data Models**: It supports multiple VC data models (e.g., VC 1.1, VC 2.0), ensuring compatibility across various decentralized identity systems.

#### Supported VC Formats:
- ldp_vc
- mso_mdoc

#### Supported Algorithms:
- PS256
- RS256
- EdDSA (Ed25519)

#### Proof Types Supported:
- RsaSignature2018
- Ed25519Signature2018
- Ed25519Signature2020

#### Project Structure

`io.mosip.vercred.vcverifier`
- **constants**
- **credentialverifier**
- `types`
- `validator`
- `verifier`
- **data**
- **exception**
- **signature**
- `impl`
- **utils**
- **CredentialVerifier.kt**

#### Package Description

- **constants** - All Validator and Verifier constants are declared in this package.
- **credentialverifier** - CredentialFactory for different credential formats are declared in this package. It also consists of classes for different credential formats.
- **data** - It has data classes for Validation Status and Verification Result.
- **exception** - Custom exceptions are defined in this package.
- **signature** - Interface and Implementations for multiple Signature Verification are available in this package.
- **utils** - It helper classes and methods that provide reusable and general-purpose functionalities across the project.
- **CredentialVerifier.kt** - The `CredentialVerifier.kt` file serves as the main entry point to the VC Verifier Library. This class provides the primary interface for interacting with the library and encapsulates all the core functionalities related to validating and verifying Verifiable Credentials (VCs).

#### Integrating jar to Maven Project


##### Add Vc-Verifier in `pom.xml`

<dependency>
<groupId>io.mosip</groupId>
<artifactId>vcverifier-jar</artifactId>
<version>{{version-number}}</version>
</dependency>

To integrate **vc-verifier** library into a Maven project , include below additional dependencies that are not managed via the `pom.xml` file of vc-verifier library.

<dependency>
<groupId>com.android.identity</groupId>
<artifactId>identity-credential</artifactId>
<version>20231002</version>
</dependency>
<dependency>
<groupId>info.weboftrust</groupId>
<artifactId>ld-signatures-java</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>decentralized-identity</groupId>
<artifactId>jsonld-common-java</artifactId>
<version>1.8.0</version>
</dependency>


#### Integrating aar to Gradle Project

To integrate **vc-verifier** library into a Gradle project , add below line in module level `build.gradle`.

dependencies {
implementation("io.mosip:vc-verifier:{{version-number}}")
}

To avoid Duplicate classes error while building the application, include the below exclusion strategy in the build.gradle file.

configurations.all {
resolutionStrategy {
exclude(module = "bcprov-jdk15to18")
exclude(module = "bcutil-jdk18on")
exclude(module = "bcprov-jdk15on")
exclude(module = "bcutil-jdk15on")
exclude(module = "titanium-json-ld")
}
}

**Note**: `version-number` should be replaced with the actual version of the library from Maven Central.



#### References:

[Data Model 1.1]( https://www.w3.org/TR/vc-data-model-1.1/)
[Data Model 2.0]( https://www.w3.org/TR/vc-data-model-2.0/)
33 changes: 0 additions & 33 deletions vc-verifier-tool/.gitignore

This file was deleted.

20 changes: 0 additions & 20 deletions vc-verifier-tool/README.md

This file was deleted.

62 changes: 0 additions & 62 deletions vc-verifier-tool/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions vc-verifier-tool/src/main/resources/application.properties

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions vc-verifier/js/.gitignore

This file was deleted.

Loading

0 comments on commit 0459557

Please sign in to comment.