Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
4eb9489
Add IdP Debug Flow Data Provider API implementation
LinukaAr Sep 8, 2025
a0af6e5
Implement DFDP Debug API with comprehensive debugging capabilities
LinukaAr Sep 14, 2025
90687ab
Refactor codec
LinukaAr Sep 14, 2025
c3cb4b0
Refactor code
LinukaAr Sep 14, 2025
cf9ae59
Merge branch 'poc-idp-validator'
LinukaAr Sep 19, 2025
fc0e4a4
Remove unused files
LinukaAr Sep 19, 2025
983f4a3
debug framework
LinukaAr Sep 30, 2025
a83b4ad
Add IdP Debug API and related models for debugging authentication flows
LinukaAr Oct 5, 2025
5aa1ed5
Improve api layer for the debug service
LinukaAr Oct 9, 2025
70f99d3
Merge remote-tracking branch 'origin/poc-idp-validator' into poc-idp-…
LinukaAr Oct 9, 2025
d8ee390
Code cleanup
LinukaAr Oct 10, 2025
5eca33d
Refactor SimpleDebugService
LinukaAr Oct 10, 2025
a30e3ec
Move context creation
LinukaAr Oct 13, 2025
34f8d04
Code cleanup
LinukaAr Oct 16, 2025
4c48a94
Add new GET endpoint
LinukaAr Oct 22, 2025
183acaf
Merge branch 'wso2:master' into poc-idp-validator
LinukaAr Oct 30, 2025
ec987ed
Code cleanup
LinukaAr Oct 30, 2025
f07ad23
Update version in pom.xml
LinukaAr Oct 30, 2025
aead54e
Update versions in pom.xml
LinukaAr Oct 30, 2025
8056975
Refactor DebugService to invoke Executer methods
LinukaAr Nov 6, 2025
74d240d
Refactor DebugAPI to new changes
LinukaAr Nov 14, 2025
32a2c62
Enhance Debug API for Generic Resource Debugging
LinukaAr Nov 24, 2025
a2b28d0
Update DebugContextResolver references to DebugContextProvider
LinukaAr Nov 26, 2025
df95f8b
Refactor Debug API Service and Remove Unused Classes
LinukaAr Feb 5, 2026
7e9168b
Rename api from idp.debug to debug
LinukaAr Feb 6, 2026
76164d4
Code cleanup
LinukaAr Feb 9, 2026
826a876
Merge remote-tracking branch 'origin/master' into poc-idp-validator
LinukaAr Feb 9, 2026
dd83888
Add debug module to the pom
LinukaAr Feb 10, 2026
7e405d1
Refactor Debug API and Service: streamline methods, remove unused code
LinukaAr Feb 12, 2026
4d4ff04
Refactor debugservice to use typed debugRequest and debugResponse
LinukaAr Feb 13, 2026
76fcaa5
Refactor Debug API models and services: make resourceId optional
LinukaAr Feb 17, 2026
7122e3a
Improve code readability and exception handling
LinukaAr Feb 17, 2026
e005b7d
Address review comments
LinukaAr Feb 19, 2026
5474222
Remove deprecated debug API models and related configurations
LinukaAr Feb 23, 2026
16058c8
Update response models, improve error handling
LinukaAr Feb 23, 2026
96ab0f0
Improve error handling in DebugApiServiceImpl
LinukaAr Feb 24, 2026
37be64f
Address PR comments
LinukaAr Mar 3, 2026
60aed94
Update licenses header
LinukaAr Mar 3, 2026
9e5fdc7
Update example values in response models
LinukaAr Mar 3, 2026
a05bfe3
Add properties section to POM files for FindBugs exclusion
LinukaAr Mar 3, 2026
72a5c2d
Address review comments
LinukaAr Mar 6, 2026
339c36e
Add minor improvements
LinukaAr Mar 6, 2026
3c1fd08
Address coderabbit comments
LinukaAr Mar 6, 2026
c889e8f
Address review comments
LinukaAr Mar 6, 2026
fdb76bd
Add minor improvements
LinukaAr Mar 6, 2026
a212e2b
Merge remote-tracking branch 'origin' into poc-idp-validator
LinukaAr Mar 6, 2026
807ddd6
Update versions in POM files
LinukaAr Mar 6, 2026
ad87c86
Add minor improvement
LinukaAr Mar 6, 2026
212618e
Add minor improvement
LinukaAr Mar 30, 2026
3d78811
Address review comments
LinukaAr Apr 29, 2026
2e6407a
Address review comments
LinukaAr May 4, 2026
4974709
Address review comments
LinukaAr May 5, 2026
9b5501c
Update api contract
LinukaAr May 5, 2026
b91345a
Add minor improvements
LinukaAr May 6, 2026
e401073
Add minor improvement
LinukaAr May 6, 2026
96117a2
Add minor improvement
LinukaAr May 12, 2026
b0d8a65
Address review comments
LinukaAr May 12, 2026
02f7bde
Address review comments
LinukaAr May 13, 2026
b81692d
Add minor fixes
LinukaAr May 13, 2026
e37200a
Improve status resolution
LinukaAr May 13, 2026
3ac51e0
Address review comments
LinukaAr May 14, 2026
87ff93e
Update error codes in debug.yaml
LinukaAr May 14, 2026
9c8e7af
Merge remote-tracking branch 'origin/master' into poc-idp-validator
LinukaAr May 14, 2026
fe70ecf
Address review comments
LinukaAr May 15, 2026
5d16a03
Address review comments
LinukaAr May 15, 2026
b22962a
Address review comments
LinukaAr May 19, 2026
53f8494
Address Review comments
LinukaAr May 20, 2026
12e151c
Improve error handling
LinukaAr May 25, 2026
947b536
Merge remote-tracking branch 'origin/master' into poc-idp-validator
LinukaAr May 29, 2026
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2026, WSO2 LLC. (https://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.
-->

<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">

<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.debug</artifactId>
<version>1.5.18-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.identity.api.server.debug.common</artifactId>
<packaging>jar</packaging>
<name>WSO2 Identity Server - Debug API Common</name>
<description>WSO2 Identity Server - Common classes for Debug API</description>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.debug.framework</artifactId>
<version>7.10.35</version>
<scope>provided</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/**
* Copyright (c) 2026, WSO2 LLC. (https://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.debug.common;

import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.identity.debug.framework.core.DebugRequestCoordinator;

/**
* Holder class for Debug Framework OSGi services.
*/
public class DebugServiceHolder {

private DebugServiceHolder() {

}

private static class DebugRequestCoordinatorHolder {

private static final DebugRequestCoordinator INSTANCE = (DebugRequestCoordinator)
PrivilegedCarbonContext.getThreadLocalCarbonContext()
.getOSGiService(DebugRequestCoordinator.class, null);
}

/**
* Get DebugRequestCoordinator OSGi service.
*
* @return DebugRequestCoordinator
*/
public static DebugRequestCoordinator getDebugRequestCoordinator() {

return DebugRequestCoordinatorHolder.INSTANCE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2026, WSO2 LLC. (https://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.
-->

<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/maven-v4_0_0.xsd">

<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.debug</artifactId>
<version>1.5.18-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.identity.api.server.debug.v1</artifactId>
<packaging>jar</packaging>
<name>WSO2 Identity Server - Debug API</name>
<description>WSO2 Identity Server - Debug API v1.0</description>

<properties>
<maven.findbugsplugin.exclude.file>${project.basedir}/../../../findbugs-exclude-filter.xml</maven.findbugsplugin.exclude.file>
</properties>
Comment thread
coderabbitai[bot] marked this conversation as resolved.

<dependencies>
<dependency>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.debug.common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.common</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-service-description</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.debug.framework</artifactId>
<version>7.10.35</version>
</dependency>
<dependency>
<groupId>commons-lang.wso2</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6.0.wso2v1</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<source>21</source>
<target>21</target>
Comment thread
LinukaAr marked this conversation as resolved.
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
</plugin>

<!--
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>4.1.2</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/debug.yaml</inputSpec>
<generatorName>org.wso2.carbon.codegen.CxfWso2Generator</generatorName>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
<apiPackage>org.wso2.carbon.identity.api.server.debug.v1</apiPackage>
<modelPackage>org.wso2.carbon.identity.api.server.debug.v1.model</modelPackage>
<packageName>org.wso2.carbon.identity.api.server.debug.v1</packageName>
<dateLibrary>java17</dateLibrary>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<ignoreFileOverride>${project.basedir}/.openapi-generator-ignore</ignoreFileOverride>
</configOptions>
<output>.</output>
<skipOverwrite>false</skipOverwrite>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>cxf-wso2-openapi-generator</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</plugin>
-->

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/**
* Copyright (c) 2026, WSO2 LLC. (https://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.debug.v1;

import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import java.io.InputStream;
import java.util.List;

import org.wso2.carbon.identity.api.server.debug.v1.model.DebugResponse;
import org.wso2.carbon.identity.api.server.debug.v1.model.DebugResult;
import org.wso2.carbon.identity.api.server.debug.v1.model.Error;
import java.util.Map;
import org.wso2.carbon.identity.api.server.debug.v1.DebugApiService;
import org.wso2.carbon.identity.api.server.debug.v1.factories.DebugApiServiceFactory;

import javax.validation.Valid;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import io.swagger.annotations.*;

import javax.validation.constraints.*;

@Path("/debug")
@Api(description = "The debug API")

public class DebugApi {

private final DebugApiService delegate;

public DebugApi() {

this.delegate = DebugApiServiceFactory.getDebugApi();
}

@Valid
@GET
@Path("/{debugId}/result")

@Produces({ "application/json" })
@ApiOperation(value = "Get Debug Result", notes = "Retrieves the debug results for a specific debug ID. This endpoint is primarily required for multi-step debug flows, such as Identity Provider (IDP) debugging, which involve intermediate steps. For most other resources, the initial request completes the flow and this endpoint may not be needed. <b>Scope (Permission) required:</b> ``internal_debug_mgt_view``", response = DebugResult.class, authorizations = {
@Authorization(value = "BasicAuth"),
@Authorization(value = "OAuth2", scopes = {
@AuthorizationScope(scope = "internal_debug_mgt_view", description = "View debug sessions and results")
})
}, tags={ "Debug", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Debug result retrieved successfully.", response = DebugResult.class),
@ApiResponse(code = 400, message = "Bad Request", response = Error.class),
@ApiResponse(code = 401, message = "Unauthorized", response = Error.class),
@ApiResponse(code = 404, message = "Not Found", response = Error.class),
@ApiResponse(code = 500, message = "Server Error", response = Error.class)
})
public Response getDebugResult( @Size(min=1)@ApiParam(value = "The debug session identifier.",required=true) @PathParam("debugId") String debugId) {

return delegate.getDebugResult(debugId );
}

@Valid
@POST
@Path("/{resourceType}")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "Start Debug Session", notes = "Initiates a debug session for supported resource types with configurable properties. <b>Scope (Permission) required:</b> ``internal_debug_mgt_update`` ", response = DebugResponse.class, authorizations = {
@Authorization(value = "BasicAuth"),
@Authorization(value = "OAuth2", scopes = {
@AuthorizationScope(scope = "internal_debug_mgt_update", description = "Create and manage debug sessions")
})
}, tags={ "Debug" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Debug session executed successfully.", response = DebugResponse.class),
@ApiResponse(code = 400, message = "Bad Request", response = Error.class),
@ApiResponse(code = 401, message = "Unauthorized", response = Error.class),
@ApiResponse(code = 403, message = "Forbidden", response = Error.class),
@ApiResponse(code = 500, message = "Server Error", response = Error.class)
})
public Response startDebugSession( @Size(min=1,max=50)@ApiParam(value = "Type of resource to debug. Allowed values: idp",required=true, allowableValues="idp") @PathParam("resourceType") String resourceType, @ApiParam(value = "Debug request with resource-specific properties." ) @Valid Map<String, String> requestBody) {

return delegate.startDebugSession(resourceType, requestBody );
}

}
Loading
Loading