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

1.1.0 #3

Open
wants to merge 81 commits into
base: release-1.x.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
683fcdf
[DSD-2409] updated the images (#176)
Rakshitha650 Apr 3, 2023
1b50479
MOSIP-26802
Apr 6, 2023
f893f9b
Merge pull request #179 from ase-101/develop_fixes
vishwa-vyom Apr 6, 2023
120124c
[ MOSIP-26666 ] updated README.md (#177) (#181)
syedsalman3753 Apr 12, 2023
8b92a86
[ MOSIP-26666 ] added onboarder for esignet and resident oidc (#184)
syedsalman3753 Apr 12, 2023
87f22af
Updated the postman env
Apr 18, 2023
70fe08e
Merge pull request #198 from ase-101/develop_fixes
vishwa-vyom Apr 18, 2023
c257fa1
otp length configurable
YaswanthNagarjuna May 10, 2023
44a20c9
Login with Password Added
YaswanthNagarjuna May 10, 2023
2d341fe
ES-50 Login with Password is added
YaswanthNagarjuna May 10, 2023
4126612
MultiLang for error message corrected
YaswanthNagarjuna May 16, 2023
e1e335c
Scan image from password filed is removed
YaswanthNagarjuna May 16, 2023
6923f36
Merge pull request #204 from YaswanthNagarjuna/ES-50
vishwa-vyom May 16, 2023
a026e68
[MOSIP-25835] Added script to generate esignet misp partner license k…
akilalakshmanan May 17, 2023
41560b5
[ES-34] (#209)
jainhitesh9998 May 19, 2023
bc359a0
[MOSIP-27593] Added initContainers to download & add self-signed ssl …
syedsalman3753 May 30, 2023
50371b9
[MOSIP-25835] Updated Readme file for adding misp partner license key…
akilalakshmanan Jun 7, 2023
8c65ec2
[DSD-2763] Updated onboarder scripts to configure S3 objects (#232)
syedsalman3753 Jun 7, 2023
d76a176
[MOSIP-27821] id's added for UI elements
YaswanthNagarjuna Jun 7, 2023
3482411
[MOSIP-27821] id's added for UI elements
YaswanthNagarjuna Jun 8, 2023
0915436
[ADDED] master toggle button for consent's scope & claims
zesu22 Jun 13, 2023
a057d45
Config script updated to deploy of signIn plugin
anshulv1401 Jun 14, 2023
b419708
[MODIFIED] master toggle button align with other toggle button
zesu22 Jun 14, 2023
67e88e3
Merge pull request #233 from YaswanthNagarjuna/MOSIP-27821
gsasikumar Jun 14, 2023
554b5b8
Merge pull request #234 from anshulv1401/develop
gsasikumar Jun 14, 2023
f220294
Merge pull request #235 from zesu22/feature/consent
gsasikumar Jun 14, 2023
c30956b
[MODIFIED] integrated secure-biometric-interface-integrator library i…
zesu22 Jun 15, 2023
78f0eb6
[MODIFIED] integrated secure-biometric-interface-integrator library i…
zesu22 Jun 15, 2023
0b567d0
Merge branch 'feature/integration' of https://github.com/zesu22/esign…
zesu22 Jun 15, 2023
cbbe4a2
[FIXES] language changes
zesu22 Jun 15, 2023
a703157
Merge pull request #236 from zesu22/feature/integration
gsasikumar Jun 15, 2023
111239d
Update Dockerfile (#238)
anshulv1401 Jun 16, 2023
d4839fa
plugin path creation added in docker file (#239)
anshulv1401 Jun 16, 2023
c7e39ec
mkdir cmd moved to docker from config file (#243)
anshulv1401 Jun 16, 2023
76d2735
[BUGFIX] updated kernel.keymanager depenency version to resolve build…
jainhitesh9998 Jun 19, 2023
08d04e5
sanity testing fixes
YaswanthNagarjuna Jun 19, 2023
56c0c00
[FIXES] SBI component comes at bottom
zesu22 Jun 19, 2023
7a892f0
Merge pull request #244 from YaswanthNagarjuna/sanity
gsasikumar Jun 20, 2023
8fe64fe
Merge pull request #245 from zesu22/develop
gsasikumar Jun 20, 2023
dd0ca32
ES-3 merge to develop (#252)
jainhitesh9998 Jun 27, 2023
af6217f
[MOSIP-28073] response corrected for the invalid format in wallet bin…
YaswanthNagarjuna Jul 4, 2023
134e234
[MODIFIED] master toggle function
zesu22 Jul 5, 2023
1a94377
[MOSIP-27549] added error handling (#258)
Rakshithb1 Jul 11, 2023
b5f9905
[MOSIP-27549] updated scripts (#259)
Rakshithb1 Jul 11, 2023
fbae132
Merge pull request #255 from zesu22/feature/es-97
gsasikumar Jul 12, 2023
d8f2530
[ES-21] maintain 2 qrcode on login
zesu22 Jul 12, 2023
776dda6
[MOSIP-28073] response corrected for invalid auth factor type (#260)
YaswanthNagarjuna Jul 12, 2023
5d78e8f
MOSIP-26238 logo added in center of wallet qrcode
YaswanthNagarjuna Jun 20, 2023
06dab0f
wallet logo added in QR code and logo is configurable
YaswanthNagarjuna Jul 13, 2023
c62cd46
wallet logo added in center of wallet QR code
YaswanthNagarjuna Jul 13, 2023
dcc7fd9
Added transaction expiry details with a timer on the consent page
YaswanthNagarjuna Jul 6, 2023
b60da93
Added transaction expiry details with a timer on the consent page
YaswanthNagarjuna Jul 12, 2023
646058d
Added transaction expiry details with a timer on the consent page usi…
YaswanthNagarjuna Jul 13, 2023
b5e93f4
made default wallet logo url as empty string
YaswanthNagarjuna Jul 13, 2023
442b664
[MODIFIED] login with qrcode
zesu22 Jul 13, 2023
73456f8
Merge pull request #247 from YaswanthNagarjuna/MOSIP-26238
gsasikumar Jul 13, 2023
70a9002
Merge branch 'develop' of https://github.com/mosip/esignet into ES-124
YaswanthNagarjuna Jul 13, 2023
88d04bc
Merge pull request #256 from YaswanthNagarjuna/ES-124
gsasikumar Jul 13, 2023
4ec9ec2
Merge branch 'develop' into feature/es-21
zesu22 Jul 13, 2023
fe68bef
Merge pull request #261 from zesu22/feature/es-21
gsasikumar Jul 13, 2023
464d2cf
[FIXED] es-21 bug, tooltip issue (#266)
zesu22 Jul 14, 2023
eeaff9d
Updated IDP UI config in application.propreties (#267)
YaswanthNagarjuna Jul 18, 2023
c5abaa0
[ES-157] (#263) (#271)
jainhitesh9998 Jul 19, 2023
30fd17b
number check added (#269)
anshulv1401 Jul 19, 2023
94b0c32
added format in test cases (#272)
YaswanthNagarjuna Jul 19, 2023
e16bb02
[ES-177] (#279)
jainhitesh9998 Jul 24, 2023
d77d188
[DSD-2996] updated esignet captcha in install.sh file and added copy_…
Prafulrakhade Jul 24, 2023
dc160c3
Fixed test case failures
Jul 24, 2023
7d777c5
Added transactionId in OIDC transaction DTO, so that transactionId is…
Jul 24, 2023
ce9e1d9
Merge pull request #280 from ase-101/develop
vishwa-vyom Jul 24, 2023
b27b485
[BUGFIX]
jainhitesh9998 Aug 2, 2023
4e7c99c
Added documentation
jainhitesh9998 Aug 2, 2023
2ad6580
ES-218 (#296)
jainhitesh9998 Aug 2, 2023
74ca7a4
Merge branch 'bugfix-ES-218' of https://github.com/Infosys/esignet in…
jainhitesh9998 Aug 2, 2023
e900a0a
[BUGFIX] remove consent in linked consent when openid is only the scope
jainhitesh9998 Aug 3, 2023
3f79522
Merge pull request #305 from Infosys/bugfix-ES-218
vishwa-vyom Aug 3, 2023
662b741
Merge pull request #303 from mosip/bugfix-ES-218
jainhitesh9998 Aug 3, 2023
9818287
[ADDED] Swagger openapi v1.1.0 yml
jainhitesh9998 Aug 17, 2023
3067b1b
[ADDED] DB upgrade scripts
jainhitesh9998 Aug 17, 2023
5bb1850
Modified Readme
jainhitesh9998 Aug 17, 2023
5c90cbe
[REFORMATTED] upgrade scripts
jainhitesh9998 Aug 17, 2023
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
1 change: 1 addition & 0 deletions .github/workflows/push_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 1.*
- develop
- main
- bugfix-ES-218

jobs:
call-workflow-codeql-analysis:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
with:
token: ${{ secrets.ACTION_PAT }}
charts_dir: ./helm
charts_url: https://github.com/mosip
charts_url: https://mosip.github.io/mosip-helm
repository: mosip-helm
branch: gh-pages
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,62 @@ The project requires JDK 11.
$ docker build -f Dockerfile
```

## Installing in k8s cluster using helm
### Pre-requisites
1. Set the kube config file of the Mosip cluster having dependent services is set correctly in PC.
1. Make sure [DB setup](db_scripts/README.md#install-in-existing-mosip-k8-cluster) is done.
1. Add / merge below mentioned properties files into existing config branch:
* [esignet-default.properties](https://github.com/mosip/mosip-config/blob/v1.2.0.1-B3/esignet-default.properties)
* [application-default.properties](https://github.com/mosip/mosip-config/blob/v1.2.0.1-B3/application-default.properties)
1. Below are the dependent services required for esignet service:
| Chart | Chart version |
|---|---|
|[Keycloak](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/external/iam) | 7.1.18 |
|[Keycloak-init](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/external/iam) | 12.0.1-B3 |
|[Postgres](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/external/postgres) | 10.16.2 |
|[Postgres Init](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/external/postgres) | 12.0.1-B3 |
|[Minio](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/external/object-store) | 10.1.6 |
|[Kafka](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/external/kafka) | 0.4.2 |
|[Config-server](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/mosip/config-server) | 12.0.1-B3 |
|[Websub](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/mosip/websub) | 12.0.1-B2 |
|[Artifactory server](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/mosip/artifactory) | 12.0.1-B3 |
|[Keymanager service](https://github.com/mosip/mosip-infra/blob/v1.2.0.1-B3/deployment/v3/mosip/keymanager) | 12.0.1-B2 |
|[Kernel services](https://github.com/mosip/mosip-infra/blob/v1.2.0.1-B3/deployment/v3/mosip/kernel) | 12.0.1-B2 |
|[Biosdk service](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/mosip/biosdk) | 12.0.1-B3 |
|[Idrepo services](https://github.com/mosip/mosip-infra/blob/v1.2.0.1-B3/deployment/v3/mosip/idrepo) | 12.0.1-B2 |
|[Pms services](https://github.com/mosip/mosip-infra/blob/v1.2.0.1-B3/deployment/v3/mosip/pms) | 12.0.1-B3 |
|[IDA services](https://github.com/mosip/mosip-infra/blob/v1.2.0.1-B3/deployment/v3/mosip/ida) | 12.0.1-B3 |

### Install
* Install `kubectl` and `helm` utilities.
* Run `install-all.sh` to deploy esignet services.
```
cd helm
./install-all.sh
```
* During the execution of the `install-all.sh` script, a prompt appears requesting information regarding the presence of a public domain and a valid SSL certificate on the server.
* If the server lacks a public domain and a valid SSL certificate, it is advisable to select the `n` option. Opting it will enable the `init-container` with an `emptyDir` volume and include it in the deployment process.
* The init-container will proceed to download the server's self-signed SSL certificate and mount it to the specified location within the container's Java keystore (i.e., `cacerts`) file.
* This particular functionality caters to scenarios where the script needs to be employed on a server utilizing self-signed SSL certificates.

### Delete
* Run `delete-all.sh` to remove esignet services.
```
cd helm
./delete-all.sh
```

### Restart
* Run `restart-all.sh` to restart esignet services.
```
cd helm
./restart-all.sh
```

## Onboard esignet
* Run onboarder's [install.sh](partner-onboarder) script to exchange jwk certificates.


## APIs
API documentation is available [here](https://mosip.stoplight.io/docs/identity-provider/branches/main/6f1syzijynu40-identity-provider).

Expand Down
2 changes: 1 addition & 1 deletion binding-service-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.mosip.esignet</groupId>
<artifactId>esignet-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
</parent>

<groupId>io.mosip.esignet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.time.format.DateTimeFormatter;
import java.util.*;

import io.mosip.esignet.api.dto.AuthChallenge;
import io.mosip.esignet.api.dto.KeyBindingResult;
import io.mosip.esignet.api.dto.SendOtpResult;
import io.mosip.esignet.api.exception.KeyBindingException;
Expand Down Expand Up @@ -80,13 +81,23 @@ public BindingOtpResponse sendBindingOtp(BindingOtpRequest bindingOtpRequest, Ma
return otpResponse;
}

private void validateChallengeListAuthFormat(List<AuthChallenge> challengeList){
if(!challengeList.stream().allMatch(challenge->keyBindingWrapper.getSupportedChallengeFormats(challenge.getAuthFactorType()).
contains(challenge.getFormat()))) {
log.error("Invalid auth factor type or challenge format in the challenge list");
throw new EsignetException(INVALID_AUTH_FACTOR_TYPE_OR_CHALLENGE_FORMAT);
}
}

@Override
public WalletBindingResponse bindWallet(WalletBindingRequest walletBindingRequest, Map<String, String> requestHeaders) throws EsignetException {
log.debug("bindWallet :: Request headers >> {}", requestHeaders);
validateChallengeListAuthFormat(walletBindingRequest.getChallengeList());

//Do not store format, only check if the format is supported by the wrapper.
if(!keyBindingWrapper.getSupportedChallengeFormats(walletBindingRequest.getAuthFactorType()).
contains(walletBindingRequest.getFormat()))
throw new EsignetException(INVALID_CHALLENGE_FORMAT);
throw new EsignetException(INVALID_AUTH_FACTOR_TYPE_OR_CHALLENGE_FORMAT);

String publicKey = IdentityProviderUtil.getJWKString(walletBindingRequest.getPublicKey());
KeyBindingResult keyBindingResult;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.esignet.services;

import io.mosip.esignet.core.dto.PublicKeyRegistry;
import io.mosip.esignet.core.spi.PublicKeyRegistryService;
import io.mosip.esignet.repository.PublicKeyRegistryRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Slf4j
@Service
public class PublicKeyRegistryServiceImpl implements PublicKeyRegistryService {

@Autowired
private PublicKeyRegistryRepository publicKeyRegistryRepository;

@Override
public Optional<PublicKeyRegistry> findLatestPublicKeyByPsuTokenAndAuthFactor(String psuToken, String authFactor) {
Optional<io.mosip.esignet.entity.PublicKeyRegistry> optionalPublicKeyRegistry = publicKeyRegistryRepository.findLatestByPsuTokenAndAuthFactor(psuToken,authFactor);
if(optionalPublicKeyRegistry.isPresent()) {
PublicKeyRegistry publicKeyRegistry = new PublicKeyRegistry();
publicKeyRegistry.setPublicKey(optionalPublicKeyRegistry.get().getPublicKey());
publicKeyRegistry.setPsuToken(optionalPublicKeyRegistry.get().getPsuToken());
publicKeyRegistry.setAuthFactor(optionalPublicKeyRegistry.get().getAuthFactor());
return Optional.of(publicKeyRegistry);
}
return Optional.empty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public void bindWallet_withUnsupportedFormat_thenFail() throws EsignetException,
AuthChallenge authChallenge = new AuthChallenge();
authChallenge.setAuthFactorType("OTP");
authChallenge.setChallenge("111111");
authChallenge.setFormat("alpha-numeric");
List<AuthChallenge> authChallengeList = new ArrayList();
authChallengeList.add(authChallenge);
walletBindingRequest.setChallengeList(authChallengeList);
Expand All @@ -210,7 +211,7 @@ public void bindWallet_withUnsupportedFormat_thenFail() throws EsignetException,
Assert.assertNotNull(keyBindingService.bindWallet(walletBindingRequest, new HashMap<>()));
Assert.fail();
} catch (EsignetException e) {
Assert.assertTrue(e.getErrorCode().equals(ErrorConstants.INVALID_CHALLENGE_FORMAT));
Assert.assertTrue(e.getErrorCode().equals(ErrorConstants.INVALID_AUTH_FACTOR_TYPE_OR_CHALLENGE_FORMAT));
}
}

Expand All @@ -230,8 +231,6 @@ public void bindWallet_withInvalidKeyBindingResult_thenFail() throws IOException
walletBindingRequest.setPublicKey(
(Map<String, Object>) objectMapper.readValue(clientJWK.toJSONString(), HashMap.class));

when(mockKeyBindingWrapperService.doKeyBinding(Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString(), Mockito.any()))
.thenReturn(null);
try {
Assert.assertNotNull(keyBindingService.bindWallet(walletBindingRequest, new HashMap<>()));
Assert.fail();
Expand Down
2 changes: 1 addition & 1 deletion client-management-service-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.mosip.esignet</groupId>
<artifactId>esignet-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
</parent>

<groupId>io.mosip.esignet</groupId>
Expand Down
36 changes: 36 additions & 0 deletions consent-service-impl/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.mosip.esignet</groupId>
<artifactId>esignet-parent</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>

<artifactId>consent-service-impl</artifactId>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<esignet.core.version>${project.version}</esignet.core.version>
</properties>
<dependencies>
<dependency>
<groupId>io.mosip.esignet</groupId>
<artifactId>esignet-core</artifactId>
<version>${esignet.core.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.modelmapper/modelmapper -->
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>3.1.1</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.esignet.config;


import org.modelmapper.ModelMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ModelMapperConfig {

@Bean
public ModelMapper modelMapper() {
return new ModelMapper();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.esignet.entity;

import lombok.*;
import org.hibernate.Hibernate;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Objects;
import java.util.UUID;

import static io.mosip.esignet.core.constants.ErrorConstants.INVALID_CLAIM;
import static io.mosip.esignet.core.constants.ErrorConstants.INVALID_CLIENT_ID;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
public class ConsentDetail {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private UUID id;

@NotNull(message = INVALID_CLIENT_ID)
@Column(name = "client_id")
private String clientId;

@NotNull
@Column(name = "psu_token")
private String psuToken;

@NotNull(message = INVALID_CLAIM)
@Column(name = "claims")
private String claims;

/*
It stores the requested authorization scopes from the relying party in a json string
{
"scope" : "boolean" (essential or optional)
}
*/
@NotNull
@Column(name = "authorization_scopes")
private String authorizationScopes;

@NotNull
@Column(name = "cr_dtimes")
private LocalDateTime createdtimes;

@Column(name = "expire_dtimes")
private LocalDateTime expiredtimes;

@Column(name = "signature")
private String signature;

@Column(name = "hash")
private String hash;

@Column(name = "accepted_claims")
private String acceptedClaims;

@Column(name = "permitted_scopes")
private String permittedScopes;

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
ConsentDetail consentDetail = (ConsentDetail) o;
return getId() != null && Objects.equals(getId(), consentDetail.getId());
}

@Override
public int hashCode() {
return getClass().hashCode();
}
}
Loading