Skip to content

Commit bccc926

Browse files
committed
Read authorisation configuration from environment variables
1 parent 3b1e1d9 commit bccc926

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cli.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ pub struct PolicyOptions {
7171
/// Beamline Policy Endpoint
7272
///
7373
/// eg, https://authz.diamond.ac.uk
74-
#[clap(long = "policy", required = false)]
74+
#[clap(long = "policy", required = false, env = "NUMTRACKER_AUTH_HOST")]
7575
pub policy_host: String,
7676
/// The Rego rule used to generate visit access data
7777
///
7878
/// eg. v1/data/diamond/policy/session/write_to_beamline_visit
79-
#[clap(long, required = false)]
79+
#[clap(long, required = false, env = "NUMTRACKER_AUTH_ACCESS")]
8080
pub access_query: String,
8181
/// The Rego rule used to generate admin access data
8282
///
8383
/// eg. v1/data/diamond/policy/admin/configure_beamline
84-
#[clap(long, required = false)]
84+
#[clap(long, required = false, env = "NUMTRACKER_AUTH_ADMIN")]
8585
pub admin_query: String,
8686
}
8787

0 commit comments

Comments
 (0)