proomt

Search

Search posts, papers, and topics

All posts

CodeName OneShai Almog8 min readintermediate

App Shield: Your Server Should Not Trust the App Calling It

Summary

App Shield moves device‑integrity checks from the client to the server by obtaining a short‑lived ES256 attestation token from Apple App Attest or Google Play Integrity, verified by Codename One’s service, and required by the backend for protected API calls.

  • Attestation token is bound to a nonce, package, platform, and optionally request body, preventing replay.
  • Server‑side verification replaces insecure client‑side booleans; compromised apps cannot forge valid tokens.
  • Integration is a one‑line enable flag plus host‑policy configuration; App Shield automatically guards Codename One’s NetworkManager requests.
  • Two host policies: ENFORCED (block request if no token) and PROTECTED (allow request but mark it unverified).

Shifting trust to the server mitigates the classic mobile threat where attackers patch client checks. By using hardware‑backed attestation and short‑lived signed tokens, the backend receives cryptographically verifiable evidence of app integrity, raising the cost of abuse for high‑value operations…

6/10

Related reading

  1. Tapjacking Protection: Rejecting Android Touches Behind an Overlay

    Codename One adds tapjacking protection to its Android runtime. It detects fully or partially obscured MotionEvents, offers four policies (OFF, REPORT, BLOCK, STRICT), can block the entire gesture, and on Android 12+ can request the system hide overlay windows. The API is exposed via `DeviceIntegrity.setTapjackingProtection` and a listener for state changes. iOS has no overlay threat, so the feat…

    CodeName Onecodenameone.com3 min
  2. Watch Apps: One Codebase, Two Real Applications

    Codename One now lets you build an Apple Watch or Wear OS companion app from a single codebase by specifying a watchMain class and optional watchStandalone flag. The new WearableConnection API offers putData, sendMessage, and transferFile primitives for asynchronous phone‑watch communication, with simulator support for both platforms.

    CodeName Onecodenameone.com4 min
  3. App Hardening: One Obfuscation Pipeline Across Every Port

    Codename One adds a cloud‑side hardening step that runs on the merged JAR before it is split into Android, iOS, JavaScript, and desktop binaries. It can rename symbols, encrypt string literals, and insert opaque‑predicate control‑flow guards at configurable levels (off → standard → aggressive → paranoid). The transforms are selective per platform to avoid breaking optimizers, and a mapping is kep…

    CodeName Onecodenameone.com6 min
  4. Preventing Destructive Actions with Step-up Authentication

    A step‑by‑step tutorial showing how to protect a high‑impact admin action (resetting all scores) in a Next.js app with Auth0 by combining role checks and a fresh MFA step‑up flow, including helper utilities, session claim preservation, and a hardened API endpoint.

    Auth0auth0.com14 min
  5. Native Drag and Drop Meets Cross-Device Continuity

    Codename One 8.0 adds two user‑experience primitives: **Cross‑Device Continuity** (state checkpointing + Apple Handoff + custom HTTP relay) and **Native Drag‑and‑Drop** (OS‑level drag using the same ClipboardContent model). The post shows the API (StateProvider, Continuity.checkpoint, NativeDragOperation), platform support tables, and practical advice on payload size, security, thread handling, a…

    CodeName Onecodenameone.com7 min