{"id":28208077,"url":"https://github.com/onewelcome/onegini-msp-example-security-proxy-request-mapper","last_synced_at":"2025-10-18T06:23:21.031Z","repository":{"id":38272162,"uuid":"69461872","full_name":"onewelcome/onegini-msp-example-security-proxy-request-mapper","owner":"onewelcome","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-06T08:51:27.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-06-12T05:39:21.902Z","etag":null,"topics":["example"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onewelcome.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2016-09-28T12:41:31.000Z","updated_at":"2021-12-29T17:11:38.000Z","dependencies_parsed_at":"2023-01-30T07:50:12.596Z","dependency_job_id":"ab577c9a-37cd-469d-ac9c-0af80eca51a2","html_url":"https://github.com/onewelcome/onegini-msp-example-security-proxy-request-mapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/onewelcome/onegini-msp-example-security-proxy-request-mapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onewelcome%2Fonegini-msp-example-security-proxy-request-mapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onewelcome%2Fonegini-msp-example-security-proxy-request-mapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onewelcome%2Fonegini-msp-example-security-proxy-request-mapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onewelcome%2Fonegini-msp-example-security-proxy-request-mapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onewelcome","download_url":"https://codeload.github.com/onewelcome/onegini-msp-example-security-proxy-request-mapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onewelcome%2Fonegini-msp-example-security-proxy-request-mapper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261390856,"owners_count":23151653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example"],"created_at":"2025-05-17T14:11:39.349Z","updated_at":"2025-10-18T06:23:21.025Z","avatar_url":"https://github.com/onewelcome.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example Request Mapper\n[![CircleCI](https://circleci.com/gh/onewelcome/example-security-proxy-request-mapper/tree/master.svg?style=svg\u0026circle-token=0b464508f4fa6b5bc48a68a9a5b07ce1438c3080)](https://circleci.com/gh/onewelcome/example-security-proxy-request-mapper/tree/master)\n\nRequest mapper is an extension to the Onegini Security Proxy, which allows to give instructions on how to modify request before it gets to a resource server.\nFor more information please see [Security Proxy Request Mapper Documentation](https://docs.onegini.com/msp/latest/security-proxy/topics/embedded-resource-gateway-functionality/implement-request-mapper.html)\n\n## Frameworks\n\nIn the Example Request Mapper project the following main frameworks are used:\n- Undertow (the reason for using it over Spring MVC is because of its lightweight and better performance)\n- Spring Boot\n\n## Configuration\n\n| Property                      | Default value | Description                                               |\n|-------------------------------|---------------|-----------------------------------------------------------|\n| basic.authentication.username | username      | The basic authentication username used to access the api. |\n| basic.authentication.password | password      | The basic authentication password used to access the api. |\n| onegini.undertow.port         | 5540          | The port on which Request Mapper will be exposed.         |\n| onegini.undertow.host         | 0.0.0.0       | The host where Request Mapper will be exposed.            |                                                                                                                                                 | \n\n## Build the sourcecode\n\n`mvn clean install`\n\n## Build the application with docker\n\n` mvn pl.project13.maven:git-commit-id-plugin:revision jib:build -Pjib`\n\n## Run the application\n\nYou can either run the application via the Spring Boot Maven plugin or by using the jar file created while building the application.\n\n`mvn spring-boot:run`\n\nor \n\n`java -jar \u003clocation of the jar file\u003e`\n\nor (via Docker)\n\n`docker run example-security-proxy-resource-gateway:latest -P5540:5540`\n\n## Example request\n\n```http\nPOST /map-request HTTP/1.1\nHost: localhost:5540\nAuthorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=\nContent-Type: application/json\n \n{\n  \"request_uri\": \"/some-resource-gateway-request-uri\",\n  \"token_validation_result\": {\n    \"scope\": \"exampleScope\",\n    \"sub\": \"exampleUserId\",\n    \"amr\": [\n       \"DEFAULT\"\n     ]\n    ...\n  },\n  \"headers\": {\n    \"header_1\":\"value_1\",\n    \"header_2\":\"value_2\",\n    \"authorization\": \"Bearer 060E7B02C875D5D74318FE0BBDA22BEFBA882B9B90F918BE77F9FCFF1A0E24B0\"\n  }\n}\n```\n\n## Example response\n\n```http\nHTTP/1.1 200 OK\nContent-Type: application/json;charset=UTF-8\n\n{\n  \"request_uri\": \"/some-resource-gateway-request-uri/exampleUserId\",\n  \"headers\": {\n    \"header_1\": \"value_1\",\n    \"header_2\": \"value_2\",\n    \"authorized_scopes\": \"exampleScope\"\n  }\n}\n```\n\n## Release\n\nTo create a release:\n\n1. Go to [Create release](https://github.com/onewelcome/onegini-msp-example-security-proxy-request-mapper/releases/new) page\n2. Create git tag with version name\n3. Generate release notes with `Auto-generate release notes`\n4. Verify if release notes are correct\n5. If it is valid then press `Publish release`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonewelcome%2Fonegini-msp-example-security-proxy-request-mapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonewelcome%2Fonegini-msp-example-security-proxy-request-mapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonewelcome%2Fonegini-msp-example-security-proxy-request-mapper/lists"}