Skip to content

Feat/Enable passwordless .pfx/cert download - #191

Draft
benjamsf wants to merge 11 commits into
mainfrom
feat/passwordless-client-certs
Draft

benjamsf wants to merge 11 commits into
mainfrom
feat/passwordless-client-certs

Conversation

@benjamsf

@benjamsf benjamsf commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Description

Get rid of the password in pfx's as that has always only been an iOS compatibility thing.

  • Downloads are now an empty-password PKCS#12.
  • Apple cannot import an empty-password PKCS#12 at all, so iOS/macOS get a new.mobileconfig endpoint instead, carrying the passworded container plus its password. Installs with no password prompt.
  • New POST /enduserpfx/session mints the JWT cookie, because iOS only hands a profile to its installer on a plain navigation, which sends no auth header.

User-Facing Changes

No password when installing your certificate

Installing your certificate no longer asks for a password. On Android the install is two taps with nothing to type.

iPhone and Mac install a configuration profile

Apple devices now download a configuration profile instead of a certificate file, installed from Settings. No password at any point.

Anything Else You'd Like to Mention

  • Shells out to openssl for this one container because pyca/cryptography refuses to serialize with an empty password, and its NoEncryption() alternative produces a container the JDK reads as empty. This means openssl added to the production image => should it be moved to libpvarki.
  • Is the /enduserpfx/session thing sane for handling iOS needs... if not, we might need to just make apple users keep the pain of writing the dumb password over and over again.

cryptography cannot serialize with an empty password, so shell out to openssl
for this one container. Keeps the friendly name so Android does not ask for one.
SecPKCS12Import cannot open an empty-password container, so Apple gets the
passworded one with the password embedded in the profile. Installs prompt-free.
The password-less PKCS12 is generated by shelling out to it, so do not rely on
the base image happening to ship it.
CSR-enrolled people get a cert-only one rather than none, so the download
endpoint never has to serve the passworded container the UI cannot explain.
iOS only hands a .mobileconfig to the profile installer on a real navigation,
which carries no Authorization header. Admin-code users never had the cookie.
It is a certificate concern, not an ORM one. Also logs openssl's stderr, which
capture_output was swallowing into an unexplained 500.
@rambo

rambo commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

How about we don't start shells, especially not in rmapi which has by far the highest damage potential if compromised. We have lived with the password prompt so far and can live with it in the future until the needed feature is exposed in upstream. We can even supply them with a patch.

@rambo rambo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not open shells.

@benjamsf
benjamsf marked this pull request as draft September 20, 2026 15:00
@benjamsf
benjamsf marked this pull request as draft September 20, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants