Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exclude = ["crates/syauth-core/fuzz"]
resolver = "2"

[workspace.package]
version = "0.2.0"
version = "0.3.0"
edition = "2024"
rust-version = "1.85"
license = "MIT"
Expand Down Expand Up @@ -59,15 +59,15 @@ workspace = true
bluer = { version = "0.17", default-features = false, features = ["bluetoothd"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
# DEV-001 TC-11: pins LESC-derived material → MAC + BondStore round-trip.
syauth-core = { version = "0.2", path = "crates/syauth-core" }
syauth-core = { version = "0.3", path = "crates/syauth-core" }
# DEV-001 TC-11: built-in `Bond` carries `time::OffsetDateTime`.
time = { version = "0.3", features = ["macros"] }
# DEV-003 cross-crate byte-identity: assert the mobile UniFFI
# `session_uuid_for_bond` output matches the desktop transport's
# `session_uuid_for` byte for byte so the phone's scan filter UUID
# set always matches the desktop's advertised service UUID.
syauth-transport = { version = "0.2", path = "crates/syauth-transport" }
syauth-mobile = { version = "0.2", path = "crates/syauth-mobile" }
syauth-transport = { version = "0.3", path = "crates/syauth-transport" }
syauth-mobile = { version = "0.3", path = "crates/syauth-mobile" }
uuid = { version = "1" }

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ endif
# deploy/version.env; the values are duplicated here only to keep the
# Make invocation self-contained.

PACKAGE_VERSION ?= 0.2.0
PACKAGE_VERSION ?= 0.3.0
RPM_RELEASE ?= 5
DEB_REVISION ?= 1
DIST_PREFIX ?= syauth-$(PACKAGE_VERSION)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sh install-syauth.sh --dry-run
sh install-syauth.sh
```

Release downloads include DEB, RPM, Arch Linux packages, and manual Linux archives for x86_64 and ARM64, plus a signed [Android APK](https://github.com/Mewplane/syauth/releases/download/v0.2.0/syauth-0.2.0-android.apk), source archive, signing certificate, build metadata, and `SHA256SUMS`. See [installation and verification](https://mewplane.github.io/syauth/how-to/install/) for direct package commands and version-pinned downloads.
Release downloads include DEB, RPM, Arch Linux packages, and manual Linux archives for x86_64 and ARM64, plus a signed [Android APK](https://github.com/Mewplane/syauth/releases/download/v0.3.0/syauth-0.3.0-android.apk), source archive, signing certificate, build metadata, and `SHA256SUMS`. See [installation and verification](https://mewplane.github.io/syauth/how-to/install/) for direct package commands and version-pinned downloads.

Use Debian 12+, Ubuntu 24.04+, a current Fedora/openSUSE/Arch installation, or a compatible derivative, with glibc 2.36+, PAM, systemd user services, BlueZ, and a BLE adapter capable of advertising. The phone needs Android 13+ with a supported Ed25519 Keystore implementation and an enrolled strong biometric. The APK can install on older Android versions, but that does not establish signing-key support.

Expand Down
2 changes: 1 addition & 1 deletion crates/syauth-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ serde_json = "1"
# wire shape the PAM module uses to probe the daemon's auth.sock.
# `syauth-presenced` already lives in the workspace; this dependency is
# library-only (no binary linkage).
syauth-presenced = { version = "0.2", path = "../syauth-presenced" }
syauth-presenced = { version = "0.3", path = "../syauth-presenced" }
# S-016 doctor: `geteuid()` for the `/run/user/<uid>` fallback when
# `XDG_RUNTIME_DIR` is unset. `nix` already lives in `Cargo.lock`
# via `syauth-presenced`, so no new transitive surface.
Expand Down
2 changes: 1 addition & 1 deletion crates/syauth-mobile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ thiserror = "2"
# `syauth-core` re-exports `Frame`, `compute_tag`, `verify_tag`,
# `sign_frame`, `verify_frame`, and the typed errors we wrap into
# `MobileError`. Pinned by path so the workspace resolves to one version.
syauth-core = { version = "0.2", path = "../syauth-core" }
syauth-core = { version = "0.3", path = "../syauth-core" }

# HKDF-SHA256 for `oob_code_for_bond`. The version pins match
# `crates/syauth-cli/Cargo.toml` so the workspace resolves to a single
Expand Down
4 changes: 2 additions & 2 deletions crates/syauth-presenced/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ nix = { version = "0.29", features = ["fs", "signal", "user", "socket"] }
libc = "0.2"
# S-004: the orchestrator reads `Bond` metadata for the rotation
# audit line and reuses `bond_key_from_pubkeys` / `BondStore` shapes.
syauth-core = { version = "0.2", path = "../syauth-core" }
syauth-core = { version = "0.3", path = "../syauth-core" }
# S-004: the `Peripheral` trait + `session_uuid_for` derivation +
# `BOND_KEY_BYTES` width all live in the transport crate. The
# `test-fake` feature ships the radio-free `FakePeripheral` test
# double for the rotation integration test; it is a default feature
# of `syauth-transport` so no explicit `features` list is required.
syauth-transport = { version = "0.2", path = "../syauth-transport" }
syauth-transport = { version = "0.3", path = "../syauth-transport" }
# S-004: 128-bit UUID type for the rotation audit short-hex render.
uuid = { version = "1" }
# S-005: belt-and-suspenders inotify watcher on `bonds.toml`. The
Expand Down
2 changes: 1 addition & 1 deletion crates/syauth-transport/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test-fake = []
# Shared protocol core. `Frame` and `FrameError` are the only types that cross
# the `BtPeer` trait boundary, so consumers can swap implementations (mock
# today, `bluer` in S-010) without touching the upper layers.
syauth-core = { version = "0.2", path = "../syauth-core" }
syauth-core = { version = "0.3", path = "../syauth-core" }

# Async trait surface. `BtPeer` and `Session` are `async fn` methods on trait
# objects; `async-trait` is the canonical way to do that on stable Rust.
Expand Down
9 changes: 9 additions & 0 deletions deploy/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
syauth (0.3.0-1) unstable; urgency=medium

* Add Nix packaging and declarative NixOS integration.
* Derive and validate the selected desktop account's PAM socket.
* Preserve daemon ownership of newly created PAM audit logs.
* Exercise installed PAM and configuration rollback in a NixOS VM in CI.

-- syauth contributors <maintainers@example.invalid> Sun, 08 Nov 2026 00:00:00 +0000

syauth (0.2.0-1) unstable; urgency=medium

* Recover Bluetooth transport after controller loss.
Expand Down
4 changes: 2 additions & 2 deletions deploy/debian/rules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
#
# Debian rules for syauth v0.2.0 (roadmap item S-021).
# Debian rules for syauth v0.3.0 (roadmap item S-021).
#
# Driven by debhelper-compat 13. The build chain is hand-rolled (not
# dh-cargo) because dh-cargo expects a single-crate package; syauth is
Expand Down Expand Up @@ -43,7 +43,7 @@ override_dh_auto_build:
# so the package surface is identical across distros.
mkdir -p debian/man
printf '%s\n' \
'.TH SYAUTH 8 "2026-05-15" "syauth 0.2.0" "System Administration"' \
'.TH SYAUTH 8 "2026-05-15" "syauth 0.3.0" "System Administration"' \
'.SH NAME' \
'syauth \- phone-as-key PAM authenticator for Linux' \
'.SH SYNOPSIS' \
Expand Down
8 changes: 6 additions & 2 deletions deploy/fedora/syauth.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fedora RPM spec for syauth v0.2.0 (roadmap item S-021).
# Fedora RPM spec for syauth v0.3.0 (roadmap item S-021).
#
# This spec ships the Linux desktop side of syauth — the PAM cdylib
# under %%{_libdir}/security/pam_syauth.so (mode 0644 per SPEC §6 +
Expand All @@ -12,7 +12,7 @@
# phone. Built under `mock -r fedora-%%{fedora}-x86_64 deploy/fedora/syauth.spec`
# or via `make rpm` (which gates on `which mock`).

%global package_version 0.2.0
%global package_version 0.3.0
%global rpm_release 5
%global debug_package %{nil}
%global min_fedora 39
Expand Down Expand Up @@ -164,6 +164,10 @@ fi
%{_mandir}/man8/syauth.8.gz

%changelog
* Sun Nov 08 2026 syauth contributors <maintainers@example.invalid> - 0.3.0-5
- Add Nix/NixOS installation with tested PAM socket configuration
- Preserve daemon access to PAM-first audit logs

* Sat Nov 07 2026 syauth contributors <maintainers@example.invalid> - 0.2.0-5
- Recover Bluetooth transport after controller loss and report transport health.

Expand Down
39 changes: 18 additions & 21 deletions deploy/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
# syauth 0.2.0
# syauth 0.3.0

This release restores phone discovery after Bluetooth controller resets and
reports transport health separately from daemon liveness.
This release adds Nix packaging and declarative NixOS integration, with installed-PAM VM coverage and a fix for audit ownership when PAM starts before the user daemon.

- Automatically rebuild GATT and rotating advertising after controller loss,
including controllers renamed from hci0 to hci1. Keep the existing pairing.
- Retry while the controller is unavailable without exhausting the service
restart limit. Bluetooth setup failures request recovery instead of leaving
a socket-only daemon.
- Add `daemon.transport_ready` to `syauth status --json`. Phone absence and an
unanswered approval do not indicate a failed local Bluetooth transport.
- Include patched ctutils and Tokio dependencies.
- Install the CLI, presence daemon, and PAM module through the pinned Nix flake.
- Configure one desktop account, its private bond store, user service, and opt-in PAM services through `nixosModules.default`.
- Generate the PAM socket argument from a declared desktop UID; require an explicit absolute socket when the UID is allocated at activation.
- Create new PAM audit logs with mode `0600` and the bond-store account's ownership, allowing the user daemon to append detailed transaction records.
- Run Nix package/module checks and a booted NixOS VM in CI, covering approvals, signature rejection, password fallback, account isolation, profile removal, and disable/rollback preserving bonds.

The companion panel update is in https://github.com/dmytrogajewski/sy/pull/9.
Each authentication still requires explicit phone approval and a strong biometric.
Thanks to [@xBLACKICEx](https://github.com/xBLACKICEx) for contributing Nix and NixOS support in [#7](https://github.com/Mewplane/syauth/pull/7). The audit fix is [#9](https://github.com/Mewplane/syauth/pull/9).

Approve Linux authentication on Android with a fresh strong biometric.
Nix setup: https://mewplane.github.io/syauth/how-to/install/#install-with-nix

- Native desktop DEB, RPM, and Arch packages and Linux archives for x86_64 and ARM64.
- Signed Android companion with four native ABIs and a published signing certificate.
- Illustrated documentation: https://mewplane.github.io/syauth/
- Installer: `curl -fsSL https://mewplane.github.io/syauth/install.sh | sh`
Existing audit logs retain their contents and ownership. If an older version created a root-owned log, have an administrator restore the desktop account's ownership and mode `0600` as documented in https://mewplane.github.io/syauth/reference/configuration/#files-and-ownership.

Packages install the CLI, PAM module, presence daemon, and user service. They do not enable PAM or start the service automatically. Follow the installation guide to prepare storage, pair the phone, select a PAM policy, and test your recovery method.
Each authentication still requires explicit phone approval and a strong biometric. The existing PAM control policy and documented security boundaries are unchanged.

Release downloads include native DEB, RPM, and Arch packages and Linux archives for x86_64 and ARM64, a signed Android companion with four native ABIs, the source archive, installer, public signing certificate, build metadata, and `SHA256SUMS`.

Linux requires glibc 2.36+; supported package paths include Debian 12+, Ubuntu 24.04+, and current Fedora/openSUSE/Arch systems. Android signing requires Android 13+ and a supported Ed25519 Keystore implementation, despite the APK's lower installation minimum.

Verify downloads against `SHA256SUMS`. `release.json` records the source commit and artifact digests. The Android release certificate SHA-256 fingerprint is `25:58:5E:64:1E:DB:3D:A8:7B:98:90:56:B3:D1:65:CA:C2:AF:AF:2A:AE:DD:35:87:56:66:B5:21:EC:C0:22:1C`.
Verify downloads against `SHA256SUMS`. `release.json` records the source revision and artifact digests. The persistent Android certificate SHA-256 fingerprint is `25:58:5E:64:1E:DB:3D:A8:7B:98:90:56:B3:D1:65:CA:C2:AF:AF:2A:AE:DD:35:87:56:66:B5:21:EC:C0:22:1C`.

Documentation and security boundaries: https://mewplane.github.io/syauth/
Installer: `curl -fsSL https://mewplane.github.io/syauth/install.sh | sh`

Read the documented security boundaries before enabling PAM: https://mewplane.github.io/syauth/explanation/security/
Packages leave PAM activation to the administrator. NixOS PAM services are also opt-in; select the complete service policy and verify recovery before relying on phone authentication.
6 changes: 3 additions & 3 deletions deploy/version.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

# The wire-shipped package version. Mirrors the Rust workspace's
# `[workspace.package].version` field in /Cargo.toml. Bump in lockstep.
PACKAGE_VERSION=0.2.0
PACKAGE_VERSION=0.3.0

# RPM release counter (the `-1` in `syauth-0.2.0-1.fc39.x86_64.rpm`).
# RPM release counter (the `-1` in `syauth-0.3.0-1.fc39.x86_64.rpm`).
# Bump only if a respin is needed without changing the source version.
RPM_RELEASE=5

# Debian revision (the `-1` in `syauth_0.2.0-1_amd64.deb`). Same rule
# Debian revision (the `-1` in `syauth_0.3.0-1_amd64.deb`). Same rule
# as RPM_RELEASE.
DEB_REVISION=1

Expand Down
20 changes: 10 additions & 10 deletions docs/contributing/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ The [release workflow](https://github.com/Mewplane/syauth/actions/workflows/rele

## Artifact contract

For version `0.2.0`, [GitHub Releases](https://github.com/Mewplane/syauth/releases/tag/v0.2.0) contains:
For version `0.3.0`, [GitHub Releases](https://github.com/Mewplane/syauth/releases/tag/v0.3.0) contains:

| Artifact | Consumer |
| --- | --- |
| `syauth_0.2.0_amd64.deb`, `syauth_0.2.0_arm64.deb` | Debian / Ubuntu and compatible derivatives |
| `syauth-0.2.0-4.x86_64.rpm`, `syauth-0.2.0-4.aarch64.rpm` | Fedora / openSUSE and compatible RPM systems |
| `syauth-0.2.0-1-x86_64.pkg.tar.zst`, `syauth-0.2.0-1-aarch64.pkg.tar.zst` | Arch package-manager installations; ARM64 requires an appropriate Arch Linux ARM system |
| `syauth-0.2.0-linux-{x86_64,aarch64}.tar.gz` | Manual installation / inspection |
| `syauth-0.2.0-android.apk` | Android companion, signed with the persistent release key |
| `syauth-0.2.0-source.tar.gz` | Tagged project sources |
| `syauth_0.3.0_amd64.deb`, `syauth_0.3.0_arm64.deb` | Debian / Ubuntu and compatible derivatives |
| `syauth-0.3.0-4.x86_64.rpm`, `syauth-0.3.0-4.aarch64.rpm` | Fedora / openSUSE and compatible RPM systems |
| `syauth-0.3.0-1-x86_64.pkg.tar.zst`, `syauth-0.3.0-1-aarch64.pkg.tar.zst` | Arch package-manager installations; ARM64 requires an appropriate Arch Linux ARM system |
| `syauth-0.3.0-linux-{x86_64,aarch64}.tar.gz` | Manual installation / inspection |
| `syauth-0.3.0-android.apk` | Android companion, signed with the persistent release key |
| `syauth-0.3.0-source.tar.gz` | Tagged project sources |
| `install.sh` | Version-selecting, checksum-verifying shell installer |
| `android-signing-certificate.pem`, `android-signing-certificate.txt` | Public signing identity and APK verification output |
| `release.json`, `SHA256SUMS` | Source revision, file sizes, SHA-256 digests |
Expand All @@ -26,9 +26,9 @@ Build the three desktop outputs and package them on the target CPU:

```sh
cargo build --locked --release -p syauth-cli -p syauth-pam -p syauth-presenced
scripts/build-linux-packages.sh --version 0.2.0 --arch x86_64 \
scripts/build-linux-packages.sh --version 0.3.0 --arch x86_64 \
--binaries target/release --output target/release-artifacts
scripts/test-package-install.sh target/release-artifacts 0.2.0 x86_64 debian
scripts/test-package-install.sh target/release-artifacts 0.3.0 x86_64 debian
```

Use `--arch aarch64` for ARM64 binaries. The packager downloads checksum-pinned nFPM 2.47.0; it does not install build tools globally. Building on a newer distribution can raise the required glibc version, so use the workflow's Debian 12 build environment for published artifacts.
Expand All @@ -41,7 +41,7 @@ The workflow installs JDK 21, Android platform 34, Build Tools 34.0.0, NDK 28.0.

```sh
NDK_HOME="$ANDROID_HOME/ndk/28.0.13004108" scripts/build_aar.sh
VERSION=0.2.0 scripts/build-release-apk.sh
VERSION=0.3.0 scripts/build-release-apk.sh
```

The signing script requires `SYAUTH_RELEASE_KEYSTORE` and `SYAUTH_RELEASE_KEYSTORE_PASSWORD`; the key alias defaults to `syauth`. Keep private material outside the checkout. The protected GitHub environment `release` stores `SYAUTH_RELEASE_KEYSTORE_BASE64` and `SYAUTH_RELEASE_KEYSTORE_PASSWORD`. Its key persists across releases; replacing it prevents ordinary Android updates from trusting the old installation.
Expand Down
Loading
Loading