-
Notifications
You must be signed in to change notification settings - Fork 190
Feature - In-Flow Extensions REST API support #1101
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
ThejithaR
wants to merge
17
commits into
wso2:master
Choose a base branch
from
ThejithaR:feature/in-flow-extensions
base: master
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
17 commits
Select commit
Hold shift + click to select a range
af0be08
In-flow Extension APIs
ThejithaR fc161a0
In-flow Extension APIs pom remove certificate management dependency
ThejithaR afd543c
dependency fix
ThejithaR a56f216
updating allowed executors list
ThejithaR 793fa63
dependency fix on action management from flow execution engine
ThejithaR d17f7cc
Adding name uniqueness check endpoint with updated exclude action id …
ThejithaR d28725c
Added InflowExtension Connections to flow builder metadata.
ThejithaR 799bd34
Added InflowExtension Connection info to flow builder metadata.
ThejithaR f5199f5
Removing dependencies:
ThejithaR e68928f
Metadata endpoint to get flow execution context tree
ThejithaR a98d523
Api support for Inflow extensions migrated from actions to flow manag…
ThejithaR 809ef68
fixed pom comment
ThejithaR 9d96d07
Added new auth type
ThejithaR 3faf70b
Merge branch 'feature/in-flow-extensions' into inflow-extension/actio…
ThejithaR 4ea326a
Merge pull request #2 from ThejithaR/inflow-extension/action-mgt-to-f…
ThejithaR 57b10b9
Update in-flow extension references
KD23243 7c6c8c5
Rename flow extensions
KD23243 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
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
138 changes: 138 additions & 0 deletions
138
...tend/java/org/wso2/carbon/identity/api/server/action/management/v1/AccessConfigModel.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,138 @@ | ||||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||||
| * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). | ||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||
| * WSO2 LLC. licenses this file to you under the Apache License, | ||||||||||||||||||||||||||
| * Version 2.0 (the "License"); you may not use this file except | ||||||||||||||||||||||||||
| * in compliance with the License. | ||||||||||||||||||||||||||
| * You may obtain a copy of the License at | ||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||
| * Unless required by applicable law or agreed to in writing, | ||||||||||||||||||||||||||
| * software distributed under the License is distributed on an | ||||||||||||||||||||||||||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||||||||||||||||||||||||
| * KIND, either express or implied. See the License for the | ||||||||||||||||||||||||||
| * specific language governing permissions and limitations | ||||||||||||||||||||||||||
| * under the License. | ||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| package org.wso2.carbon.identity.api.server.action.management.v1; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||||||||||||||||||||||||||
| import io.swagger.annotations.ApiModelProperty; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import java.util.List; | ||||||||||||||||||||||||||
| import java.util.Objects; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import javax.validation.Valid; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||
| * Access Configuration model for In-Flow Extension actions. | ||||||||||||||||||||||||||
| * Defines what context data is exposed and what operations are allowed. | ||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||
| * <p>The {@code expose} field accepts either plain strings (path prefixes) or objects with | ||||||||||||||||||||||||||
| * {@code path} and {@code encrypted} properties. When strings are provided, encryption | ||||||||||||||||||||||||||
| * defaults to {@code false}.</p> | ||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||
| * <p>Example:</p> | ||||||||||||||||||||||||||
| * <pre>{@code | ||||||||||||||||||||||||||
| * { | ||||||||||||||||||||||||||
| * "expose": [ | ||||||||||||||||||||||||||
| * "/user/userId", | ||||||||||||||||||||||||||
| * { "path": "/user/claims/", "encrypted": true }, | ||||||||||||||||||||||||||
| * { "path": "/user/credentials/password", "encrypted": true }, | ||||||||||||||||||||||||||
| * "/properties/" | ||||||||||||||||||||||||||
| * ], | ||||||||||||||||||||||||||
| * "modify": [ | ||||||||||||||||||||||||||
| * "/properties/riskScore", | ||||||||||||||||||||||||||
| * { "path": "/user/claims/email", "encrypted": true } | ||||||||||||||||||||||||||
| * ] | ||||||||||||||||||||||||||
| * } | ||||||||||||||||||||||||||
| * }</pre> | ||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||
| public class AccessConfigModel { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| private List<Object> expose; | ||||||||||||||||||||||||||
| private List<Object> modify; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| public AccessConfigModel() { | ||||||||||||||||||||||||||
| // Default constructor required for Jackson | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| public AccessConfigModel expose(List<Object> expose) { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| this.expose = expose; | ||||||||||||||||||||||||||
|
Comment on lines
+61
to
+64
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log Improvement Suggestion No: 1
Suggested change
|
||||||||||||||||||||||||||
| return this; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @ApiModelProperty() | ||||||||||||||||||||||||||
| @JsonProperty("expose") | ||||||||||||||||||||||||||
| @Valid | ||||||||||||||||||||||||||
| public List<Object> getExpose() { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| return expose; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| public void setExpose(List<Object> expose) { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| this.expose = expose; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| public AccessConfigModel modify(List<Object> modify) { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| this.modify = modify; | ||||||||||||||||||||||||||
|
Comment on lines
+79
to
+83
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log Improvement Suggestion No: 2
Suggested change
|
||||||||||||||||||||||||||
| return this; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @ApiModelProperty() | ||||||||||||||||||||||||||
| @JsonProperty("modify") | ||||||||||||||||||||||||||
| @Valid | ||||||||||||||||||||||||||
| public List<Object> getModify() { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| return modify; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| public void setModify(List<Object> modify) { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| this.modify = modify; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @Override | ||||||||||||||||||||||||||
| public boolean equals(java.lang.Object o) { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| if (this == o) { | ||||||||||||||||||||||||||
| return true; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| if (o == null || getClass() != o.getClass()) { | ||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| AccessConfigModel that = (AccessConfigModel) o; | ||||||||||||||||||||||||||
| return Objects.equals(this.expose, that.expose) && | ||||||||||||||||||||||||||
| Objects.equals(this.modify, that.modify); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @Override | ||||||||||||||||||||||||||
| public int hashCode() { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| return Objects.hash(expose, modify); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @Override | ||||||||||||||||||||||||||
| public String toString() { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| StringBuilder sb = new StringBuilder(); | ||||||||||||||||||||||||||
| sb.append("class AccessConfigModel {\n"); | ||||||||||||||||||||||||||
| sb.append(" expose: ").append(toIndentedString(expose)).append("\n"); | ||||||||||||||||||||||||||
| sb.append(" modify: ").append(toIndentedString(modify)).append("\n"); | ||||||||||||||||||||||||||
| sb.append("}"); | ||||||||||||||||||||||||||
| return sb.toString(); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| private String toIndentedString(java.lang.Object o) { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| if (o == null) { | ||||||||||||||||||||||||||
| return "null"; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| return o.toString().replace("\n", "\n "); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
95 changes: 95 additions & 0 deletions
95
...extend/java/org/wso2/carbon/identity/api/server/action/management/v1/EncryptionModel.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,95 @@ | ||||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||||
| * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). | ||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||
| * WSO2 LLC. licenses this file to you under the Apache License, | ||||||||||||||||||||||||||
| * Version 2.0 (the "License"); you may not use this file except | ||||||||||||||||||||||||||
| * in compliance with the License. | ||||||||||||||||||||||||||
| * You may obtain a copy of the License at | ||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||
| * Unless required by applicable law or agreed to in writing, | ||||||||||||||||||||||||||
| * software distributed under the License is distributed on an | ||||||||||||||||||||||||||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||||||||||||||||||||||||
| * KIND, either express or implied. See the License for the | ||||||||||||||||||||||||||
| * specific language governing permissions and limitations | ||||||||||||||||||||||||||
| * under the License. | ||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| package org.wso2.carbon.identity.api.server.action.management.v1; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||||||||||||||||||||||||||
| import io.swagger.annotations.ApiModelProperty; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import java.util.Objects; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import javax.validation.Valid; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||
| * Encryption configuration model for In-Flow Extension actions. | ||||||||||||||||||||||||||
| * Holds the external service's certificate used for JWE encryption of sensitive data. | ||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||
| public class EncryptionModel { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| private String certificate; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| public EncryptionModel() { | ||||||||||||||||||||||||||
| // Default constructor required for Jackson | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| public EncryptionModel certificate(String certificate) { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| this.certificate = certificate; | ||||||||||||||||||||||||||
| return this; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @ApiModelProperty() | ||||||||||||||||||||||||||
| @JsonProperty("certificate") | ||||||||||||||||||||||||||
| @Valid | ||||||||||||||||||||||||||
| public String getCertificate() { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| return certificate; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| public void setCertificate(String certificate) { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| this.certificate = certificate; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
Comment on lines
+53
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log Improvement Suggestion No: 3
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @Override | ||||||||||||||||||||||||||
| public boolean equals(java.lang.Object o) { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| if (this == o) { | ||||||||||||||||||||||||||
| return true; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| if (o == null || getClass() != o.getClass()) { | ||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| EncryptionModel that = (EncryptionModel) o; | ||||||||||||||||||||||||||
| return Objects.equals(this.certificate, that.certificate); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @Override | ||||||||||||||||||||||||||
| public int hashCode() { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| return Objects.hash(certificate); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @Override | ||||||||||||||||||||||||||
| public String toString() { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| StringBuilder sb = new StringBuilder(); | ||||||||||||||||||||||||||
| sb.append("class EncryptionModel {\n"); | ||||||||||||||||||||||||||
| sb.append(" certificate: ").append(toIndentedString(certificate)).append("\n"); | ||||||||||||||||||||||||||
| sb.append("}"); | ||||||||||||||||||||||||||
| return sb.toString(); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| private String toIndentedString(java.lang.Object o) { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| if (o == null) { | ||||||||||||||||||||||||||
| return "null"; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| return o.toString().replace("\n", "\n "); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update license headers