1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! CI domain types shared across all CI workflows.
use fmt;
use PathBuf;
/// Default passphrase used to encrypt the file-backed CI key when `AUTHS_PASSPHRASE`
/// is not set in the environment.
///
/// CI identities are ephemeral and low-value, so this default keeps the documented
/// quickstart copy-paste runnable. Production pipelines should export their own
/// `AUTHS_PASSPHRASE` (a managed secret) before running `auths init --profile ci`.
pub const DEFAULT_CI_PASSPHRASE: &str = "Ci-ephemeral-pass1!";
/// CI platform environment.
///
/// Usage:
/// ```ignore
/// let env = CiEnvironment::GitHubActions;
/// ```
/// Configuration for CI/ephemeral identity.
///
/// The signing keychain is passed separately to [`crate::domains::identity::service::initialize`];
/// this struct carries the CI-specific configuration values, including the file-backed
/// key location and the passphrase needed to reconstruct it in a later `auths sign` process.
///
/// Args:
/// * `ci_environment`: The detected or specified CI platform.
/// * `registry_path`: Path to the ephemeral auths registry.
/// * `keychain_file`: Path to the encrypted file holding the CI signing key.
/// * `passphrase`: Passphrase encrypting the file-backed key (echoed into the env block).
///
/// Usage:
/// ```ignore
/// let config = CiIdentityConfig {
/// ci_environment: CiEnvironment::GitHubActions,
/// registry_path: PathBuf::from("/tmp/.auths-ci"),
/// keychain_file: PathBuf::from("/tmp/.auths-ci/keys.enc"),
/// passphrase: "ci-secret".to_string(),
/// };
/// ```