Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5cce4e7
OpenAM UI JS SDK initial commit
maximthomas Nov 26, 2025
30044e5
Add react router and realm and login url parameters
maximthomas Nov 27, 2025
c1bab4d
update README
maximthomas Nov 27, 2025
58ba2d3
fix openam-ui-js-sdk build
maximthomas Nov 27, 2025
c2a3ec7
add save password function to the default user form
maximthomas Dec 1, 2025
371dddd
Apply suggestions from code review
maximthomas Mar 30, 2026
f1414b8
CVE-2025-66453 Rhino has high CPU usage and potential DoS (#943)
dependabot[bot] Dec 5, 2025
26c46cd
Update org.openidentityplatform.opendj to 5.0.2 (#940)
vharseko Dec 5, 2025
e4e72e0
CVE-2025-64718 js-yaml has prototype pollution in merge (<<)
maximthomas Dec 9, 2025
4bb652d
CVE-2025-12183 CVE-2025-66566 LZ4 vulnerabilities (#946)
maximthomas Dec 9, 2025
06daa71
Docs: set supported Java and Tomcat versions (#944)
maximthomas Dec 10, 2025
d4767d1
[maven-release-plugin] prepare release 16.0.4
Dec 10, 2025
ceec917
[maven-release-plugin] prepare for next development iteration
Dec 10, 2025
84d7115
fix javadoc build (#948)
maximthomas Dec 11, 2025
b8e5872
CVE-2025-67735 Netty has a CRLF Injection vulnerability in io.netty.h…
dependabot[bot] Dec 16, 2025
587ef61
CVE-2025-15284 qs's arrayLimit bypass in its bracket notation allows …
dependabot[bot] Jan 12, 2026
64a29a8
[#951] Set explicit xmlsec dependency for openam-federation-library (…
maximthomas Jan 13, 2026
448c6bd
CVE-2025-13465 Lodash has Prototype Pollution Vulnerability in `_.uns…
dependabot[bot] Jan 22, 2026
1bcf57e
CVE-2025-13465 Lodash versions 4.0.0 through 4.17.22 are vulnerable t…
maximthomas Jan 27, 2026
21fc6e0
[#955] Update JSTL to Jakarta 2.0.0 version (#957)
maximthomas Feb 4, 2026
57d3429
[#956] Add OpenAM secondary instances to the Docker test in build.yml…
maximthomas Feb 4, 2026
f4423ff
Update org.openidentityplatform.opendj to 5.0.3 (#947)
vharseko Feb 4, 2026
7810d74
[maven-release-plugin] prepare release 16.0.5
Feb 4, 2026
0b35489
[maven-release-plugin] prepare for next development iteration
Feb 4, 2026
cbc01e7
CVE-2026-2391 qs's arrayLimit bypass in comma parsing allows denial o…
dependabot[bot] Feb 15, 2026
5b3ee16
CVE-2026-32141 CVE-2026-33228 flatted vulnerable to unbounded recursi…
dependabot[bot] Mar 21, 2026
195c53a
CVE-2026-33439 Pre-Authentication Remote Code Execution via jato.clie…
maximthomas Mar 21, 2026
7af7143
Update opendj.version to 5.0.4 (#964)
vharseko Mar 24, 2026
0b654a6
[maven-release-plugin] prepare release 16.0.6
Mar 24, 2026
9cbe55b
[maven-release-plugin] prepare for next development iteration
Mar 24, 2026
6382e00
Update build.yml add JDK 26 support (#967)
vharseko Mar 24, 2026
6298224
CVE-2026-33672 CVE-2026-33671: Method injection in POSIX character c…
Copilot Mar 26, 2026
e420345
CVE-2026-33870 Netty: HTTP Request Smuggling via Chunked Extension Qu…
dependabot[bot] Mar 27, 2026
7ab7133
disable resource filtering for openam-ui-js-sdk
maximthomas Mar 30, 2026
f663164
add missing copyright
maximthomas Mar 30, 2026
9ac2134
process response errors for userService
maximthomas Mar 30, 2026
1d1c858
Merge remote-tracking branch 'origin/master' into openam-js-sdk
maximthomas Mar 30, 2026
72eca21
Apply suggestions from code review
maximthomas Mar 30, 2026
31dc8a7
update parent pom version
maximthomas Mar 30, 2026
8a36867
Apply suggestions from code review
maximthomas Mar 31, 2026
5237f10
add missing copyright
maximthomas Mar 31, 2026
5b0f093
Apply suggestions from code review
maximthomas Mar 31, 2026
cf8d55e
fix user service typo
maximthomas Mar 31, 2026
25f5478
Fix review comments
maximthomas Mar 31, 2026
03ed06a
fix build errors
maximthomas Mar 31, 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
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
continue-on-error: true
run: |
mvn javadoc:aggregate -pl '-:openam-server,-:openam-server-only' \
-pl '-:openam-ui,-:openam-ui-ria,-:openam-ui-api' \
-pl '-:openam-ui,-:openam-ui-ria,-:openam-ui-api,-:openam-ui-js-sdk' \
-pl '-:openam-server-auth-ui,-:openam-doc-ssoadm-ref,-:openam-liberty-schema' \
-pl '-:openam-example-api-descriptor,-:openam-example-clientsdk-cli,-:openam-example-clientsdk-war' \
-pl '-:bcpkix-shaded'
Expand Down
24 changes: 24 additions & 0 deletions openam-server-only/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/api</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.openidentityplatform.openam</groupId>
<artifactId>openam-ui-js-sdk</artifactId>
<classifier>app</classifier>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extui</outputDirectory>
<includes>**/*</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
Expand Down Expand Up @@ -265,6 +274,14 @@
<targetPath>api</targetPath>
<filtering>true</filtering>
</webResource>
<webResource>
<directory>${project.build.directory}/extui/</directory>
<includes>
<include>**/**</include>
</includes>
<targetPath>extui</targetPath>
<filtering>false</filtering>
</webResource>
<webResource>
<directory>${basedir}/src/main/webapp</directory>
<includes>
Expand Down Expand Up @@ -567,6 +584,13 @@
<type>jar</type>
</dependency>

<dependency>
<groupId>org.openidentityplatform.openam</groupId>
<artifactId>openam-ui-js-sdk</artifactId>
<type>zip</type>
<classifier>app</classifier>
</dependency>

<dependency>
<groupId>org.openidentityplatform.openam</groupId>
<artifactId>openam-core</artifactId>
Expand Down
3 changes: 2 additions & 1 deletion openam-server-only/src/main/resources/services/amCORS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
serviceHierarchy="/DSAMEConfig/CORSService"
i18nFileName="amCORS"
resourceName="cors"
i18nKey="cors-service-description">
i18nKey="cors-service-description" revisionNumber="2">
<Global>
<AttributeSchema name="cors-enabled"
type="single"
Expand Down Expand Up @@ -93,6 +93,7 @@
<Value>Upgrade-Insecure-Requests</Value>
<Value>Referer</Value>
<Value>Cookie</Value>
<Value>Accept-API-Version</Value>
</DefaultValues>
</AttributeSchema>
<AttributeSchema name="exposed-headers"
Expand Down
2 changes: 2 additions & 0 deletions openam-ui/openam-ui-js-sdk/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#VITE_OPENAM_SERVER=http://openam.example.org:8080
#VITE_OPENAM_CONTEXT_PATH=/openam
2 changes: 2 additions & 0 deletions openam-ui/openam-ui-js-sdk/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VITE_OPENAM_SERVER=http://openam.example.org:8080
VITE_OPENAM_CONTEXT_PATH=/openam
29 changes: 29 additions & 0 deletions openam-ui/openam-ui-js-sdk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?


*.zip

example/
153 changes: 153 additions & 0 deletions openam-ui/openam-ui-js-sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# OpenAM Alternative Frontend SDK

OpenAM is a robust access management solution, but integrating it with modern frontend applications can be complex and time-consuming. This SDK aims to simplify that process by providing pre-built React components and a flexible, modular setup, saving developers significant time while ensuring secure, seamless integration with OpenAM.

This project is intended to provide an alternative frontend SDK for interacting with Open Identity Platform's OpenAM authentication services. It is built using modern web technologies and aims to simplify the integration process for developers.

## Features
- **Ease of Use**: Pre-configured React components ready for integration.
- **Modular & Flexible**: Easily swap components and customize the SDK to suit your needs.
- **TypeScript Support**: Enhance development experience with type safety and better code completion.
- **Seamless Integration**: Easily integrate OpenAM with minimal configuration.

# Prerequisites
- Node.js 22 LTS and newer
- OpenAM 14 and newer

## Installation

Clone and build the source code

```bash
git clone https://github.com/OpenIdentityPlatform/openam-js-sdk.git
```

```bash
cd openam-js-sdk
npm install
npm run build
```

## Usage

### As an Application

Copy the contents of the `target/app` folder into your OpenAM WAR file (or the extracted WAR contents in your web container), e.g., into a directory like `extui`, so it could be accessible in your OpenAM context path, for example, http://openam.example.org:8080/openam/extui

You can also run the application in a standalone server. The only condition, the servers should be on the same subdomain, so OpenAM's cookies could be sent from the frontend application.


## As an SDK library

To install the SDK, use npm or yarn:

```bash
npm install <path to openam-js-sdk folder> #for example /home/user/projects/openam-js-sdk
# or
yarn add <path to openam-js-sdk folder>
```
## Usage
Here's a basic example of how to use the SDK in a React application:

```tsx
import React from 'react';
import { OpenAMUI } from 'openam-js-sdk';

const App = () => {
return (
<OpenAMUI />
);
};
```

## Customization

You can customize the SDK by providing your own UI components and styles.

To customize the application behaviour, customise the following settings:

```ts
export interface Config {
openamServer: string; //OpenAM server host, for example http://openam.example.org:8080
openamContextPath: string; //OpenAM context path, for example /openam
LoginForm: LoginForm; //LoginForm interface implementation
UserForm: UserForm; //UserForm interface implementation
ErrorForm: ErrorForm; //ErrorForm interface implementation
CallbackElement: CallbackElement; //CallbackElement interface implementation
ActionElements: ActionElements; //ActionElements interface implementation
redirectOnSuccessfulLogin: boolean; //redirects user on successful login to the target URL, otherwise shows a profile.
getOpenAmUrl: () => string; //returns a full OpenAM URL, for example http://openam.example.org:8080/openam
}
```

for example

```tsx
// update the default configuration
import React, { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { OpenAMUI, setConfig } from 'openam-js-sdk';

setConfig({
openamServer: 'https://openam.example.org:443',
openamContextPath: '/am',
ErrorForm: ({ error, resetError }) => {
return (
<div>
<h1>An error occurred</h1>
<p>{error?.message}</p>
<input
type="button"
value="Retry"
onClick={() => resetError()}
/>
</div>
);
},
});

createRoot(document.getElementById('root')!).render(
<StrictMode>
<OpenAMUI />
</StrictMode>,
);
```

There are components you can override:

```tsx
// renders a login form with callbacks
export type LoginForm = React.FC<{
authData: AuthData,
setCallbackValue: (i: number, val: string) => void,
doLogin: (action: string) => void
}>

// renders a callback such as NameCallback, PasswordCallback and so on
export type CallbackElement = React.FC<{
callback: Callback
setCallbackValue: (val: string) => void
}>

// renders a user profile form
export type UserForm = React.FC<{
userData: UserData,
setUserData: (userData: UserData) => void
saveHandler: () => void
savePasswordHandler: (password: string) => void
}>

// renders an authentication error form
export type ErrorForm = React.FC<{
error: AuthError,
resetError: () => void
}>

// renders submit buttons; if there are no ConfirmationCallback in the callbacks array, renders the default button
export type ActionElements = React.FC<{callbacks: Callback[]}>
```


## Contributing
Contributions are welcome! Please fork the repository and submit a pull request with your changes. Make sure to follow the coding standards and include tests for any new features.

31 changes: 31 additions & 0 deletions openam-ui/openam-ui-js-sdk/assembly/app-zip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2025 3A Systems LLC.
-->
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd">
<id>app</id>
<baseDirectory>/</baseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>target/app</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
</assembly>
31 changes: 31 additions & 0 deletions openam-ui/openam-ui-js-sdk/assembly/lib-zip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2025 3A Systems LLC.
-->
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd">
<id>lib</id>
<baseDirectory>/</baseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>target/lib</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
</assembly>
23 changes: 23 additions & 0 deletions openam-ui/openam-ui-js-sdk/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs['recommended-latest'],
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
},
])
12 changes: 12 additions & 0 deletions openam-ui/openam-ui-js-sdk/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>openam-js-sdk</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading
Loading