Skip to content
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

ForgeRock Android SDK 4.7.0 Release #470

Merged
merged 28 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
aad6d45
SDKS-3408 Self device management implementation
witrisna Oct 9, 2024
b6cd0b7
Merge pull request #458 from ForgeRock/SDKS-3408
spetrov Oct 16, 2024
95f25ca
SDKS-3489 Upgrade to Gradle 8.9 and Support Android Studio Ladybug
witrisna Oct 17, 2024
f1b5c1f
Merge pull request #460 from ForgeRock/SDKS-3489
spetrov Oct 17, 2024
19963a8
SDKS-3541 Align Device Self service naming with iOS SDK
witrisna Nov 4, 2024
1ad6a27
Merge pull request #461 from ForgeRock/SDKS-3541
spetrov Nov 5, 2024
a57b166
SDKS-3423 Handle Sign out with ID Token for PingOne Platform.
witrisna Nov 6, 2024
0e151ec
Rename .java to .kt
witrisna Oct 4, 2024
7cfb7cd
SDKS-3467 Refactor the Encryption component.
witrisna Oct 4, 2024
0cb37c3
Merge pull request #462 from ForgeRock/SDKS-3423
spetrov Nov 18, 2024
8af50e2
Merge pull request #457 from ForgeRock/SDKS-3467
spetrov Dec 2, 2024
fb10d4e
SDKS-3571 Align Device Management interface with other platforms
witrisna Nov 8, 2024
8ca531f
Merge pull request #463 from ForgeRock/SDKS-3571
spetrov Dec 6, 2024
99da6de
SDKS-3595 Remove Deprecated Sample Apps
witrisna Nov 20, 2024
9e3be1e
Merge pull request #464 from ForgeRock/SDKS-3595
spetrov Dec 11, 2024
d4b7b38
SDKS-3697 Prevent duplicated notification on the SDK
rodrigoareis Jan 3, 2025
9afe9d5
Merge pull request #465 from ForgeRock/SDKS-3697
rodrigoareis Jan 15, 2025
181e8bd
SDKS-3707 Update documentation links in README files.
forgerock-chris Jan 20, 2025
3d89718
Merge pull request #466 from ForgeRock/SDKS-3707
forgerock-chris Jan 23, 2025
3a1d76a
ForgeRock Android SDK 4.7.0 Release preparation
spetrov Jan 28, 2025
a6ab20c
Fix e2e tests that fail on BitBar
spetrov Jan 29, 2025
fc98596
SDKS-3750 Resolve High Severity Vulnerability WS-2022-0468 in jackson…
witrisna Jan 30, 2025
eaaf192
Merge pull request #468 from ForgeRock/SDKS-3750
spetrov Feb 3, 2025
3321e35
Switched to v4 of upload-artifact and download-artifact actions
spetrov Feb 3, 2025
5b9c472
SDKS-3772 Revoke and terminate the session when it does not match the…
witrisna Feb 3, 2025
cae899f
Merge pull request #469 from ForgeRock/SDKS-3772
spetrov Feb 4, 2025
1f5722c
Updated CHANGELOG.md
spetrov Feb 4, 2025
b867e0c
Merge pull request #467 from ForgeRock/SDKS-3708
spetrov Feb 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/workflows/bitbar-prepare-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Sign app-debug-androidTest.apk
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: samples/app/build/outputs/apk/androidTest/debug
releaseDirectory: e2e/app/build/outputs/apk/androidTest/debug
signingKeyBase64: ${{ secrets.SIGNING_KEYSTORE }}
alias: ${{ secrets.SIGNING_ALIAS }}
keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
Expand All @@ -72,14 +72,14 @@ jobs:

# Publish the signed APKs as build artifacts
- name: Publish app-debug-androidTest.apk
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success()
with:
name: app-debug-androidTest-signed.apk
path: samples/app/build/outputs/apk/androidTest/debug/app-debug-androidTest-signed.apk
path: e2e/app/build/outputs/apk/androidTest/debug/app-debug-androidTest-signed.apk

- name: Publish forgerock-integration-tests-debug-androidTest-signed.apk
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success()
with:
name: forgerock-integration-tests-debug-androidTest-signed.apk
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bitbar-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jobs:
steps:
# Get the test artifacts prepared in previous step
- name: Get the app-debug-androidTest.apk BitBar artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: app-debug-androidTest-signed.apk

- name: Get the forgerock-integration-tests-debug-androidTest.apk BitBar artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: forgerock-integration-tests-debug-androidTest-signed.apk

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-live-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:

# Save the logcat logs as run artifact
- name: Upload logcat logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Logcat-logs
path: forgerock-auth/build/outputs/androidTest-results/connected/**/logcat-org*.txt
Expand Down
2 changes: 0 additions & 2 deletions .lift.toml

This file was deleted.

12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## [4.7.0]
#### Added
- A fallback mechanism that uses an asymmetric key if symmetric key generation in the Android Keystore fails [SDKS-3467]
- Support for Self-Service [SDKS-3408]
- Support for Sign-out with ID Token in the PingOne Platform [SDKS-3423]

#### Fixed
- Prevent duplicate PUSH notifications in the Authenticator module [SDKS-3533]
- Fixed an issue where, in some cases, a user's session was not invalidated upon re-authentication [SDKS-3772]

## [4.6.0]
#### Added
- Allow developers to customize SDK storage [SDKS-3378]
Expand Down Expand Up @@ -188,7 +198,7 @@
#### Added
- `Set Persistent Cookie Node` is now supported to persist and manage Cookie [SDKS-182]
- `Device Profile Collector Node` is now supported [SDKS-293]
- `MetadataCallback` is now supported. For AM 6.5.2, when `MetadataCallback` is returned with stage value, SDK automatically parses `MetadataCallback` into Node's stage property. Please refer [this blog post](https://forum.forgerock.com/2020/02/using-an-authentication-tree-stage-to-build-a-custom-ui-with-the-forgerock-javascript-sdk/) for more details. [SDKS-305]
- `MetadataCallback` is now supported. For AM 6.5.2, when `MetadataCallback` is returned with stage value, SDK automatically parses `MetadataCallback` into Node's stage property. [SDKS-305]
- Allow server url paths to be configurable, Custom URL paths can be configured through `String.xml` or `ServerConfig` [SDKS-307]
- Support `Authentication by Server` and `Transaction Authenticate to Tree` in Policy Environment. [SDKS-88]
- Interface alignment with other platforms and introduce FRSession to authenticate against Authentication Tree in AM, persist and manage Session Token [SDKS-177]
Expand Down
43 changes: 18 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<p align="center">
<a href="https://github.com/ForgeRock">
<img src="https://www.forgerock.com/themes/custom/forgerock/images/fr-logo-horz-color.svg" alt="Logo">
<img src="https://cdn-docs.pingidentity.com/navbar/ping-logo-horizontal.svg" alt="Logo">
</a>
<h2 align="center">ForgeRock SDK for Android</h2>
<h2 align="center">Ping SDK for Android</h2>
<p align="center">
<a href="CHANGELOG.md">Change Log</a>
·
Expand All @@ -17,17 +17,18 @@
<hr/>
</p>

The ForgeRock Android SDK enables you to quickly integrate the [ForgeRock Identity Platform](https://www.forgerock.com/digital-identity-and-access-management-platform) into your Android apps.
The Ping SDK for Android enables you to quickly integrate Ping products into your Android apps.

Use the SDKs to leverage _[Intelligent Authentication](https://www.forgerock.com/platform/access-management/intelligent-authentication)_ in [ForgeRock's Access Management (AM)](https://www.forgerock.com/platform/access-management) product, to easily step through each stage of an authentication tree by using callbacks.
Use the SDKs to leverage _[Intelligent Access](https://www.pingidentity.com/en/platform/capabilities/intelligent-access.html)_ to easily step through each stage of an authentication tree by using callbacks.

<!------------------------------------------------------------------------------------------------------------------------------------>
<!-- REQUIREMENTS - Supported AM versions, API versions, any other requirements. -->

## Requirements

* ForgeRock Identity Platform
* Access Management (AM) 6.5.2+
* Ping Advanced Identity Cloud
* PingAM 6.5.2+

* Android API level 23+
* Android 6.0 (Marshmallow), 7.0 (Nougat), 8.0 (Oreo), 9.0 (Pie), 10.0, 11.0, 12.0, 13.0, 14.0, 15.0
Expand All @@ -50,22 +51,22 @@ dependencies {

To try out the ForgeRock Android SDK sample, perform these steps:

1. Setup an Access Management (AM) instance, as described in the **[Documentation](https://sdks.forgerock.com/android/01_prepare-am/)**.
1. Setup an Advanced Identity Cloud tenant or PingAM instance, as described in the **[Documentation](https://docs.pingidentity.com/sdks/latest/sdks/tutorials/android/00_before-you-begin.html#server_configuration)**.
2. Clone this repo:

```
git clone https://github.com/ForgeRock/forgerock-android-sdk.git
```
3. Open the Android SDK project in [Android Studio](https://developer.android.com/studio).
4. Open `/app/src/main/res/values/strings.xml` and edit the values to match your AM instance.
4. Open `/app/src/main/res/values/strings.xml` and edit the values to match your server.
5. On the **Run** menu, click **Run 'app'**.

<!------------------------------------------------------------------------------------------------------------------------------------>
<!-- DOCS - Link off to the AM-centric documentation at sdks.forgerock.com. -->

## Documentation

Documentation for the SDKs is provided at **<https://sdks.forgerock.com>**, and includes topics such as:
Documentation for the SDKs is provided at **<https://docs.pingidentity.com/sdks>**, and includes topics such as:

* Introducing the SDK Features
* Preparing AM for use with the SDKS
Expand All @@ -91,16 +92,16 @@ JavaDoc

## Support

If you encounter any issues, be sure to check our **[Troubleshooting](https://backstage.forgerock.com/knowledge/kb/article/a68547609)** pages.
If you encounter any issues, be sure to check our **[Troubleshooting](https://support.pingidentity.com/s/article/How-do-I-troubleshoot-the-ForgeRock-SDK-for-Android)** pages.

Support tickets can be raised whenever you need our assistance; here are some examples of when it is appropriate to open a ticket (but not limited to):

* Suspected bugs or problems with ForgeRock software.
* Requests for assistance - please look at the **[Documentation](https://sdks.forgerock.com)** and **[Knowledge Base](https://backstage.forgerock.com/knowledge/kb/home/g32324668)** first.
* Requests for assistance - please look at the **[Documentation](https://docs.pingidentity.com/sdks)** and **[Knowledge Base](https://support.pingidentity.com/s/knowledge-base)** first.

You can raise a ticket using **[BackStage](https://backstage.forgerock.com/support/tickets)**, our customer support portal that provides one stop access to ForgeRock services.
You can raise a ticket using the **[Ping Identity Support Portal](https://support.pingidentity.com/s/)** that provides one stop access to support services.

BackStage shows all currently open support tickets and allows you to raise a new one by clicking **New Ticket**.
The support portal shows all currently open support tickets and allows you to raise a new one by clicking **New Ticket**.

<!------------------------------------------------------------------------------------------------------------------------------------>
<!-- COLLABORATION -->
Expand All @@ -109,22 +110,15 @@ BackStage shows all currently open support tickets and allows you to raise a new

If you would like to contribute to this project you can fork the repository, clone it to your machine and get started.

<!-- Note: Found elsewhere, but is Java-only //-->
Be sure to check out our [Coding Style and Guidelines](https://wikis.forgerock.org/confluence/display/devcom/Coding+Style+and+Guidelines) page.

<!------------------------------------------------------------------------------------------------------------------------------------>
<!-- LEGAL -->

## Disclaimer

> **This code is provided by ForgeRock on an “as is” basis, without warranty of any kind, to the fullest extent permitted by law.
>ForgeRock does not represent or warrant or make any guarantee regarding the use of this code or the accuracy,
>timeliness or completeness of any data or information relating to this code, and ForgeRock hereby disclaims all warranties whether express,
>or implied or statutory, including without limitation the implied warranties of merchantability, fitness for a particular purpose,
>and any warranty of non-infringement. ForgeRock shall not have any liability arising out of or related to any use,
>implementation or configuration of this code, including but not limited to use for any commercial purpose.
>Any action or suit relating to the use of the code may be brought only in the courts of a jurisdiction wherein
>ForgeRock resides or in which ForgeRock conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions.**
> **This code is provided by Ping Identity Corporation ("Ping") on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law.
> Ping Identity Corporation does not represent or warrant or make any guarantee regarding the use of this code or the accuracy, timeliness or completeness of any data or information relating to this code, and Ping Identity Corporation hereby disclaims all warranties whether express, or implied or statutory, including without limitation the implied warranties of merchantability, fitness for a particular purpose, and any warranty of non-infringement.
> Ping Identity Corporation shall not have any liability arising out of or related to any use, implementation or configuration of this code, including but not limited to use for any commercial purpose.
> Any action or suit relating to the use of the code may be brought only in the courts of a jurisdiction wherein Ping Identity Corporation resides or in which Ping Identity Corporation conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions.**

<!------------------------------------------------------------------------------------------------------------------------------------>
<!-- LICENSE - Links to the MIT LICENSE file in each repo. -->
Expand All @@ -135,6 +129,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file

---

&copy; Copyright 2020 ForgeRock AS. All Rights Reserved
&copy; Copyright 2020-2025 Ping Identity. All Rights Reserved

[forgerock-logo]: https://www.forgerock.com/themes/custom/forgerock/images/fr-logo-horz-color.svg "ForgeRock Logo"
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ val customTemplatesFolder = file("$projectDir/dokka/templates")
buildscript {

dependencies {
classpath("com.android.tools.build:gradle:8.6.0")
classpath("com.android.tools.build:gradle:8.7.1")
classpath("com.adarshr:gradle-test-logger-plugin:2.0.0")
classpath("com.google.gms:google-services:4.3.15")
}
Expand All @@ -26,7 +26,7 @@ buildscript {
plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
id("org.sonatype.gradle.plugins.scan") version "2.4.0"
id("org.jetbrains.dokka") version "1.9.10"
id("org.jetbrains.dokka") version "2.0.0"
id("com.android.application") version "8.6.0" apply false
id("com.android.library") version "8.6.0" apply false
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
Expand All @@ -47,9 +47,9 @@ allprojects {

resolutionStrategy {
// Due to vulnerability [CVE-2022-40152] from dokka project.
force("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.5")
force("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.13.5")
force("com.fasterxml.jackson.core:jackson-databind:2.13.5")
force("com.fasterxml.jackson.module:jackson-module-kotlin:2.15.0")
force("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.15.0")
force("com.fasterxml.jackson.core:jackson-databind:2.15.0")
// Junit test project
force("junit:junit:4.13.2")
//Due to Vulnerability [CVE-2022-2390]: CWE-471 The product does not properly
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ repositories {
}

dependencies {
implementation("com.android.tools.build:gradle-api:8.6.0")
implementation("com.android.tools.build:gradle-api:8.7.1")
}
File renamed without changes.
17 changes: 8 additions & 9 deletions samples/app/build.gradle.kts → e2e/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,19 @@ dependencies {

// End of SDK

// Keep the sample application specific library out of the toml
// Material Design 3
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.compose.material3:material3")
implementation("androidx.core:core-splashscreen:1.0.1")
implementation(libs.material)
implementation(libs.androidx.material3.android)
implementation(libs.androidx.core.splashscreen)

// Android Studio Preview support
implementation("androidx.compose.ui:ui-tooling-preview")
debugImplementation("androidx.compose.ui:ui-tooling")
implementation(libs.androidx.ui.tooling.preview)
debugImplementation(libs.androidx.ui.tooling)

implementation("androidx.activity:activity-compose:1.8.2")
implementation(libs.androidx.activity.compose)

implementation("androidx.navigation:navigation-compose:2.7.7")
implementation("androidx.compose.material:material-icons-extended:1.6.2")
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.material.icons.extended)

implementation(libs.androidx.appcompat)
testImplementation(libs.junit)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2023 ForgeRock. All rights reserved.
~ Copyright (c) 2023 - 2024 ForgeRock. All rights reserved.
~
~ This software may be modified and distributed under the terms
~ of the MIT license. See the LICENSE file for details.
~ This software may be modified and distributed under the terms
~ of the MIT license. See the LICENSE file for details.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
Expand Down Expand Up @@ -51,7 +51,6 @@
</intent-filter>
</activity>

<!-- Using Custom scheme
<activity android:name="net.openid.appauth.RedirectUriReceiverActivity"
android:exported="true"
tools:node="replace">
Expand All @@ -63,9 +62,9 @@
android:scheme="org.forgerock.demo" />
</intent-filter>
</activity>
-->

<!-- Using https scheme -->
<!--
<activity
android:name="net.openid.appauth.RedirectUriReceiverActivity"
android:exported="true"
Expand All @@ -77,10 +76,11 @@
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="https" />
<data android:host="example.com" />
<data android:path="/oauth2redirect" />
<data android:host="https://openam-sdks2.forgeblocks.com/" />
<data android:path="/login" />
</intent-filter>
</activity>
-->

</application>

Expand Down
81 changes: 81 additions & 0 deletions e2e/app/src/main/java/com/example/app/Alert.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* Copyright (c) 2023 - 2024 ForgeRock. All rights reserved.
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/

package com.example.app

import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue

@Composable
fun Alert(throwable: Throwable) {

var showConfirmation by remember {
mutableStateOf(true)
}

if (showConfirmation) {
AlertDialog(
onDismissRequest = { showConfirmation = false },
confirmButton = {},
dismissButton = {
TextButton(onClick = { showConfirmation = false })
{ Text(text = "Ok") }
},
text = {
Text(text = throwable.toString())
}
)
}
}

@Composable
fun Alert(throwable: Throwable?, onDismiss: () -> Unit) {
throwable?.let {
AlertDialog(
onDismissRequest = { onDismiss() },
confirmButton = {},
dismissButton = {
TextButton(onClick = { onDismiss() })
{ Text(text = "Ok") }
},
text = {
Text(text = throwable.toString())
}
)
}
}

@Composable
fun Alert(msg: String, onOK: () -> Unit) {

var showConfirmation by remember {
mutableStateOf(true)
}

if (showConfirmation) {
AlertDialog(
onDismissRequest = { showConfirmation = false },
confirmButton = {},
dismissButton = {
TextButton(onClick = {
showConfirmation = false
onOK()
})
{ Text(text = "Ok") }
},
text = {
Text(text = msg)
}
)
}
}
Loading
Loading