How is your experience with the OutSystems Community?
4
Views
3
Comments
Solved by AI
Get Public key from Plugin Touch Id
Question
Application Type
Mobile

I am wondering, why when using Biometric plugins in Outsystems, there is no authentication using digital signature , challenge, private - public key?


regards 

2023-12-26 10-35-28
OutSystems Neo
Staff
Solution by AI
AI Generated

There isn’t (as of O11) an official OutSystems mobile plugin whose purpose is specifically “generate asymmetric key pair in the OS keystore and sign challenges.” That part is normally done either:

  1. By your own custom native plugin (Cordova) that you wrap in OutSystems, or
  2. Indirectly via the Key Store Plugin, depending on how far you want to go.

1. OutSystems‑provided plugin closest to what you want

The Key Store Plugin is the official plugin that deals with secure storage of secrets in the OS‑level secure storage (Keychain / Keystore).Key Store Plugin

Key points:

  • It lets you set/get/remove secrets (key–value pairs) that are always encrypted by the OS.
  • From version 2.3.0, you can require user authentication (biometrics / device lock screen) to access a value, using the KeyAuthentication parameter of SetValue.
  • It does not expose explicit “GenerateKeyPair” or “Sign” actions, but it leverages the OS secure storage primitives under the hood.

So if your REST‑API design is based on storing device secrets/tokens that are protected by biometrics, the Key Store Plugin is the supported way to do it.Key Store Plugin

2. When you really need a true key pair + sign operation

For a strict public/private key pair + challenge/signature flow, you’ll need a custom plugin that:

  • On iOS uses Keychain / Secure Enclave (e.g. SecKeyCreateRandomKey, SecKeyCreateSignature).
  • On Android uses Android Keystore (KeyPairGenerator, Signature, KeyGenParameterSpec with setUserAuthenticationRequired(true)).

Then you:

  1. Wrap that plugin in OutSystems as a mobile plugin using the normal plugin wrapper pattern.Integrating Plugins with OutSystems
  2. Expose actions like:
    • GenerateKeyPair() (returns public key as text/bytes)
    • Sign(data) (returns signature bytes/base64)
  3. Use the biometric plugin just to unlock the keystore operation (OS handles that part).

OutSystems gives you the architecture and build tooling (MOBS) to integrate that plugin, but the actual key‑pair generation/signature logic is implemented in the native code of your plugin.Integrating Plugins with OutSystems


So, to answer directly:

  • There is no official OutSystems plugin whose main public API is “Generate key pair in OS keystore and sign challenge.”
  • The closest official building block is the Key Store Plugin for secure, optionally biometric‑protected storage of secrets.
  • For a true asymmetric key‑pair + sign flow, you must create (or adopt from GitHub/Cordova and wrap) a custom native plugin, and then use it together with your biometric plugin in OutSystems 11.
This answer was AI-generated. Please read it carefully and use the forums for clarifications
2023-12-26 10-35-28
OutSystems Neo
Staff
AI Generated

OutSystems itself doesn’t remove that capability; it’s mostly a scope and responsibility choice of the standard biometric plugins and of OutSystems’ mobile architecture.

In practice, there are three different layers that often get mixed up:

  1. Local biometric check (OS‑level)
  2. Cryptographic operations (key pairs, signatures, challenges)
  3. Application/server authentication (tokens, sessions, REST)

The Forge “biometric” plugins you see typically implement only (1), and sometimes (2) is left entirely to OS native APIs or other custom plugins. Here’s why.


1. What the typical OutSystems biometric plugins actually do

Most Forge biometric plugins (TouchID, Fingerprint, generic Biometric/FaceID, etc.) are thin wrappers over:

  • iOS LocalAuthentication (LAContext)
  • Android BiometricPrompt / FingerprintManager

Those APIs are primarily meant to answer:
“Is the real device owner present and authenticated?”

So the plugin exposes actions like:

  • IsAvailable
  • Authenticate → returns Success/Fail message

They don’t define any opinionated, end‑to‑end authentication protocol for your app (token flow, key management, challenge‑response). That protocol is intentionally left up to you to implement at app + backend level.Mobile Application Architecture -- Plugins, UI & Security


2. Why you don’t see “digital signature / challenge / public‑private key” out of the box

There are a few reasons this is not bundled directly into the standard biometric plugins:

  1. Different use cases, different cryptographic flows

  2. Key management belongs in the OS secure keystore, not in OutSystems
    Generating, storing, and using keys is done via:

    • iOS Secure Enclave / Keychain
    • Android Keystore
      Those APIs are platform‑specific and not directly part of the LocalAuthentication / BiometricPrompt APIs. So you usually need:
    • One plugin for “Biometric prompt”
    • Another plugin (or extended code) for “KeyPair generation + Sign/Decrypt” The Forge plugins you see often cover only the first.
  3. Security responsibility and flexibility
    OutSystems recommends you keep:

    • Private keys / strong crypto either server‑side,
    • Or, if on device, well‑isolated in native code / OS keystore, with a well‑defined threat model.
      That tends to be solution‑specific, so the platform and generic plugins avoid baking in a generic crypto protocol and instead let each project decide between:
    • OAuth2/token‑based flows (most common and easier), or
    • Custom device‑key flows (more advanced).Mobile Application Architecture – Security: Data Storage and Encryption Best Practices
  4. Mobile app architecture in OutSystems
    OutSystems 11 mobile follows a “plugins + client actions + REST” pattern:

    • Plugin: gives you low‑level capabilities (biometric check, crypto, camera, etc.).
    • Client action: orchestrates those calls.
    • REST integrations: talk to your backend.
      The authentication logic (including any challenge/response, digital signatures, tokens) is expected to live in:
    • Your client actions (front‑end flow) +
    • Your server modules / external APIs,
      rather than inside a single plugin.Mobile Application Architecture -- Plugins, UI & Security

3. How to get to a challenge / signature / key‑pair flow in OutSystems O11

Even though the standard biometric plugins don’t directly expose “SignChallengeWithPrivateKey”, you can still implement the full flow in OutSystems by combining pieces:

Option A – Recommended in most projects (OAuth2‑style)

Option B – Device key pair + challenge/response (what you’re asking about)
You can design it like this:

  1. First login (password, MFA…)

    • Backend authenticates normally.
    • Mobile calls a native plugin that:
      • Generates a key pair in the OS keystore.
      • Marks the private key as “user authentication required” (biometric).
    • Mobile sends the public key to your backend, bound to user + device.
  2. Subsequent “biometric login”

    • Mobile calls biometric plugin → if OK, the OS allows use of the private key.
    • Mobile calls backend GET /auth/challenge.
    • Backend returns a random nonce / challenge.
    • Mobile asks the crypto plugin to sign the challenge using the private key.
    • Mobile sends signed challenge + device ID to POST /auth/verify.
    • Backend verifies signature with stored public key and issues a token/session.

In OutSystems 11, this becomes:

  • Client actions:

    • BiometricCheck() from the biometric plugin.
    • GenerateDeviceKeyPair() and SignData() from a custom/native plugin (or an extended Forge plugin).
    • QuickLogin() orchestration (call biometric, call REST challenge, sign, call REST verify).
  • Server:

    • Exposes /auth/challenge and /auth/verify.
    • Stores public keys, validates signatures using .NET/Java crypto libs.

So the reason you don’t see this “out of the box” is:

  • Standard biometric plugins purposely solve only the “local biometric check” problem.
  • The crypto + protocol part is considered application‑specific and normally implemented:
    • As custom or extended plugins (for key pair + signing), and
    • In your OutSystems server modules / external services (for challenges and verification).

If you share which plugin you’re using and whether your backend is OutSystems or external, you can layer this flow on top of the plugin you already have.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
2025-01-09 14-56-57
IQ78
what native plugin that Generates a key pair in the OS keystore.
2023-12-26 10-35-28
OutSystems Neo
Staff
Solution by AI
AI Generated

There isn’t (as of O11) an official OutSystems mobile plugin whose purpose is specifically “generate asymmetric key pair in the OS keystore and sign challenges.” That part is normally done either:

  1. By your own custom native plugin (Cordova) that you wrap in OutSystems, or
  2. Indirectly via the Key Store Plugin, depending on how far you want to go.

1. OutSystems‑provided plugin closest to what you want

The Key Store Plugin is the official plugin that deals with secure storage of secrets in the OS‑level secure storage (Keychain / Keystore).Key Store Plugin

Key points:

  • It lets you set/get/remove secrets (key–value pairs) that are always encrypted by the OS.
  • From version 2.3.0, you can require user authentication (biometrics / device lock screen) to access a value, using the KeyAuthentication parameter of SetValue.
  • It does not expose explicit “GenerateKeyPair” or “Sign” actions, but it leverages the OS secure storage primitives under the hood.

So if your REST‑API design is based on storing device secrets/tokens that are protected by biometrics, the Key Store Plugin is the supported way to do it.Key Store Plugin

2. When you really need a true key pair + sign operation

For a strict public/private key pair + challenge/signature flow, you’ll need a custom plugin that:

  • On iOS uses Keychain / Secure Enclave (e.g. SecKeyCreateRandomKey, SecKeyCreateSignature).
  • On Android uses Android Keystore (KeyPairGenerator, Signature, KeyGenParameterSpec with setUserAuthenticationRequired(true)).

Then you:

  1. Wrap that plugin in OutSystems as a mobile plugin using the normal plugin wrapper pattern.Integrating Plugins with OutSystems
  2. Expose actions like:
    • GenerateKeyPair() (returns public key as text/bytes)
    • Sign(data) (returns signature bytes/base64)
  3. Use the biometric plugin just to unlock the keystore operation (OS handles that part).

OutSystems gives you the architecture and build tooling (MOBS) to integrate that plugin, but the actual key‑pair generation/signature logic is implemented in the native code of your plugin.Integrating Plugins with OutSystems


So, to answer directly:

  • There is no official OutSystems plugin whose main public API is “Generate key pair in OS keystore and sign challenge.”
  • The closest official building block is the Key Store Plugin for secure, optionally biometric‑protected storage of secrets.
  • For a true asymmetric key‑pair + sign flow, you must create (or adopt from GitHub/Cordova and wrap) a custom native plugin, and then use it together with your biometric plugin in OutSystems 11.
This answer was AI-generated. Please read it carefully and use the forums for clarifications
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.