-
Notifications
You must be signed in to change notification settings - Fork 3
Feat/main/dcr fallback with mtls #32
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR adds support for mTLS (mutual TLS) authentication for Dynamic Client Registration (DCR) fallback functionality, and upgrades both the iOS and Android HAAPI SDK dependencies to version 5.0.0.
Key changes:
- Updates HAAPI SDK from 4.x to 5.0.0 for both iOS (4.3.0 → 5.0.0) and Android (4.2.1 → 5.0.0)
- Adds mTLS client authentication option for fallback registration on Android as an alternative to client secret
- Documents new mTLS-related configuration parameters (
client_authentication_mtls,mtls_client_keystore,mtls_client_keystore_password,mtls_server_truststore)
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| react-native-haapi-module.podspec | Updates iOS HAAPI SDK dependency to version 5.0.0 |
| android/build.gradle | Updates Android HAAPI SDK dependency to version 5.0.0 |
| android/src/main/java/io/curity/haapi/react/HaapiConfigurationUtil.kt | Implements mTLS client authentication support for DCR fallback with conditional logic to choose between mTLS and secret-based authentication |
| README.md | Documents new mTLS configuration parameters and reformats existing documentation tables for better readability |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| val registrationEndpoint = asOptionalUri(conf, "registrationEndpointUri") ?: return | ||
| val fallbackTemplate = asStringOrThrow(conf, "fallback_template_id") | ||
| val registrationClientSecret = asStringOrThrow(conf, "registration_secret") | ||
| val clientAuthenticationMethod |
Copilot
AI
Nov 18, 2025
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.
Variable declaration is missing initialization. The variable clientAuthenticationMethod must be initialized or use an explicit type annotation. Consider using:
val clientAuthenticationMethod: ClientAuthenticationMethodConfigurationor initialize it inline with an if expression:
val clientAuthenticationMethod = if (conf["client_authentication_mtls"] as? Boolean? ?: false) {
// ...
} else {
// ...
}| val clientAuthenticationMethod | |
| val clientAuthenticationMethod: ClientAuthenticationMethodConfiguration |
README.md
Outdated
| `mtls_client_keystore` | android | false | | The client KeyStore | ||
| `mtls_client_keystore_password` | android | false | | The password for the clientKeyStore. | ||
| `mtls_server_truststore` | android | false | | The server TrustStore | ||
| `registration_secret` | android | false | | Name of the template client to be used in fallback. Required if fallback registration should be used. |
Copilot
AI
Nov 18, 2025
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.
Duplicate parameter entry. The parameter registration_secret is already documented on line 28. This duplicate entry on line 33 should be removed.
| `registration_secret` | android | false | | Name of the template client to be used in fallback. Required if fallback registration should be used. |
I m boostraping the mtls client authentication. I guess we need to match the types expected by the SDK somehow:
@daniellindau any ideas how to do that?