Device password policy: require a screen lock (passwordComplexity)

Aperta
#153 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
android, java, kotlin
Ambito
mobile, security

Direzione di ricerca

Start by reading proto/registry.md and tracing the Android agent’s config.apply handling and check-in reporting for security.deviceSecure. The issue proposes Android API 31+ password complexity, an API 24–30 fallback, a prompt for users, and a compliance signal; it does not name implementation files or tests. Done means policy can be applied and unmet requirements are reported to the console.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Area

Device agent (Android)

The problem

We need to require a screen lock (PIN, pattern or password) on managed devices. Today MDMesh can see whether a device has one (the agent reports security.deviceSecure, shown as "Screen lock set" on the device page), but it can't require one: proto/registry.md lists passwordComplexity as "Planned: not advertised yet".

A lost device without a screen lock gives access to everything on it, and a remote device.lock does little when there is no lock to return to.

In #2 you listed password policy among the tracked follow-ups and offered to prioritise one that matters. For us this is the one.

Proposed solution

A password policy in the configuration, applied with config.apply (Device Owner):

  • API 31+: DevicePolicyManager.setRequiredPasswordComplexity (NONE / LOW / MEDIUM / HIGH).
  • API 24–30: setPasswordQuality with setPasswordMinimumLength as the fallback.
  • When the current lock doesn't meet the policy, the agent asks the user to set one (a notification that opens DevicePolicyManager.ACTION_SET_NEW_PASSWORD), since Android doesn't prompt by itself.
  • Compliance in the check-in (isActivePasswordSufficient, next to the existing deviceSecure), so the console can flag devices whose lock doesn't meet the policy.

The configuration still has the Headwind-era passwordMode field, which could be reused or replaced.

If it helps, we can prepare a pull request.

Alternatives considered

Asking users to set a screen lock and checking "Screen lock set" on each device page by hand. That can't be enforced, and it doesn't scale.

Before submitting
  • I searched existing issues and discussions for the same idea.
Lingua principale
Java
Stelle
44
Fork
25
Merge medio
1g 13h
PR unite (30g)
80

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MDMesh-app/MDMesh

Tutte le issue di MDMesh-app/MDMesh

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.