-
Notifications
You must be signed in to change notification settings - Fork 151
[ES-2740] [ES-2741] [ES-2742] Validations of Open-Id profile configurations #1573
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
Open
Md-Humair-KK
wants to merge
21
commits into
mosip:develop
Choose a base branch
from
Infosys:ES-2742A
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
185ad9e
updating project version to 1.8.0 (#1561)
sacrana0 a60133d
[MOSIP-43535] updated image tag and repo (#1565)
Ivanmeneges 9d76a35
OpenId profile static table creation and Foundational classes to hand…
Md-Humair-KK ee84292
openid profile global configurations
Md-Humair-KK 13cb6c7
openid profile global configurations
Md-Humair-KK 89b2305
openid profile global configurations
Md-Humair-KK 7a5cdd2
openid profile global configurations
Md-Humair-KK 7e2a13e
addressed review comments
Md-Humair-KK d988c00
addressed review comments
Md-Humair-KK 42e10a2
Delete logs/access_log.2025-12-08
Md-Humair-KK 0d7e78c
addressed review comments
Md-Humair-KK 369c232
addressed review comments
Md-Humair-KK f8d066e
added null check validation for additional config
Md-Humair-KK ad9045a
resolved conflicts
Md-Humair-KK 9a489b2
Merge branch 'develop' of https://github.com/mosip/esignet into ES-2742A
Md-Humair-KK 499c20a
resloved review comments
Md-Humair-KK 45e6756
resloved review comments
Md-Humair-KK aa8a1cb
made the suggested changes
Md-Humair-KK b9730da
done suggested changes
Md-Humair-KK 864a3ef
updated to none
Md-Humair-KK 802ac31
chnages to support agnoustic changes
Md-Humair-KK File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
Md-Humair-KK marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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 hidden or 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 hidden or 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,27 @@ | ||
| -- 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/. | ||
| -- ------------------------------------------------------------------------------------------------- | ||
| -- Database Name: mosip_esignet | ||
| -- Table Name : openid_profile | ||
| -- Purpose : Openid profile: static table to store the profile and feature(as part of profile) mapping | ||
| -- | ||
| -- Create By : Md Humair K | ||
| -- Created Date : Nov-2025 | ||
| -- | ||
| -- Modified Date Modified By Comments / Remarks | ||
| -- ------------------------------------------------------------------------------------------ | ||
| -- ------------------------------------------------------------------------------------------ | ||
|
|
||
| -- Table: openid_profile | ||
| CREATE TABLE IF NOT EXISTS openid_profile ( | ||
| profile_name VARCHAR(100) NOT NULL, | ||
| feature VARCHAR(100) NOT NULL, | ||
| additional_config_key VARCHAR(200) NOT NULL, | ||
| CONSTRAINT pk_openid_profile PRIMARY KEY (profile_name, feature) | ||
| ); | ||
Md-Humair-KK marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| -- COMMENT ON TABLE openid_profile IS 'Static table for global configuration: profile name and feature mapping.'; | ||
| -- COMMENT ON COLUMN openid_profile.profile_name IS 'Profile name for configuration.'; | ||
| -- COMMENT ON COLUMN openid_profile.feature IS 'Feature enabled for the profile.'; | ||
| -- COMMENT ON COLUMN openid_profile.additional_config_key IS 'Additional config key name for the feature.'; | ||
This file contains hidden or 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 hidden or 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,4 @@ | ||
| INSERT INTO openid_profile (profile_name, feature, additional_config_key) VALUES | ||
| ('fapi2.0', 'PAR', 'require_pushed_authorization_requests'), | ||
| ('fapi2.0', 'DPOP', 'dpop_bound_access_tokens'), | ||
| ('fapi2.0', 'JWE', 'userinfo_response_type'); | ||
Md-Humair-KK marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
19 changes: 19 additions & 0 deletions
19
esignet-core/src/main/java/io/mosip/esignet/core/spi/ServerProfileService.java
This file contains hidden or 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,19 @@ | ||
| /* | ||
| * 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.core.spi; | ||
|
|
||
| import io.mosip.esignet.core.exception.EsignetException; | ||
| import java.util.List; | ||
|
|
||
| public interface ServerProfileService { | ||
|
|
||
| /** | ||
| * Get the features associated with the profile | ||
| * @param profileName name of the profile - fapi2.0. nisdsp, gov, none etc | ||
| * @return list of features associated with the profile | ||
| */ | ||
| List<String> getFeaturesByProfileName(String profileName) throws EsignetException; | ||
Md-Humair-KK marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
32 changes: 32 additions & 0 deletions
32
oidc-service-impl/src/main/java/io/mosip/esignet/entity/ServerProfile.java
Md-Humair-KK marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,32 @@ | ||
| /* | ||
| * 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.AllArgsConstructor; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import jakarta.persistence.*; | ||
|
|
||
| @Data | ||
| @Entity | ||
| @Table(name = "openid_profile") | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @IdClass(ServerProfileId.class) | ||
| public class ServerProfile { | ||
| @Id | ||
| @Column(name = "profile_name", length = 100, nullable = false) | ||
| private String profileName; | ||
|
|
||
| @Id | ||
| @Column(name = "feature", length = 100, nullable = false) | ||
| private String feature; | ||
|
|
||
| @Column(name = "additional_config_key", length = 200, nullable = false) | ||
| private String additionalConfigKey; | ||
|
|
||
| } |
43 changes: 43 additions & 0 deletions
43
oidc-service-impl/src/main/java/io/mosip/esignet/entity/ServerProfileId.java
This file contains hidden or 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,43 @@ | ||
| /* | ||
| * 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.Getter; | ||
| import lombok.Setter; | ||
|
|
||
| import java.io.Serial; | ||
| import java.io.Serializable; | ||
| import java.util.Objects; | ||
|
|
||
| @Setter | ||
| @Getter | ||
| public class ServerProfileId implements Serializable { | ||
| @Serial | ||
| private static final long serialVersionUID = 1L; | ||
| private String profileName; | ||
| private String feature; | ||
|
|
||
| public ServerProfileId() {} | ||
|
|
||
| public ServerProfileId(String profileName, String feature) { | ||
| this.profileName = profileName; | ||
| this.feature = feature; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean equals(Object o) { | ||
| if (this == o) return true; | ||
| if (!(o instanceof ServerProfileId)) return false; | ||
| ServerProfileId that = (ServerProfileId) o; | ||
| return Objects.equals(profileName, that.profileName) && | ||
| Objects.equals(feature, that.feature); | ||
| } | ||
|
|
||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(profileName, feature); | ||
| } | ||
| } |
18 changes: 18 additions & 0 deletions
18
oidc-service-impl/src/main/java/io/mosip/esignet/repository/ServerProfileRepository.java
This file contains hidden or 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,18 @@ | ||
| /* | ||
| * 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.repository; | ||
|
|
||
| import io.mosip.esignet.entity.ServerProfile; | ||
| import io.mosip.esignet.entity.ServerProfileId; | ||
| import org.springframework.cache.annotation.Cacheable; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public interface ServerProfileRepository extends JpaRepository<ServerProfile, ServerProfileId> { | ||
| @Cacheable(value = "serverprofile", key = "#profileName") | ||
| List<ServerProfile> findByProfileName(String profileName); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.