diff --git a/max-grant-duration/1d/.manifest b/max-grant-duration/1d/.manifest new file mode 100644 index 0000000..eac43c6 --- /dev/null +++ b/max-grant-duration/1d/.manifest @@ -0,0 +1 @@ +{ "roots": ["policy"] } diff --git a/max-grant-duration/1d/policy.rego b/max-grant-duration/1d/policy.rego new file mode 100644 index 0000000..a43587e --- /dev/null +++ b/max-grant-duration/1d/policy.rego @@ -0,0 +1,8 @@ +package time + +import data.abbey.functions + +allow[msg] { + functions.expire_after("24h") + msg := "granting access for 1 day" +} diff --git a/max-grant-duration/1h/.manifest b/max-grant-duration/1h/.manifest new file mode 100644 index 0000000..eac43c6 --- /dev/null +++ b/max-grant-duration/1h/.manifest @@ -0,0 +1 @@ +{ "roots": ["policy"] } diff --git a/max-grant-duration/1h/policy.rego b/max-grant-duration/1h/policy.rego new file mode 100644 index 0000000..da73cf5 --- /dev/null +++ b/max-grant-duration/1h/policy.rego @@ -0,0 +1,8 @@ +package time + +import data.abbey.functions + +allow[msg] { + functions.expire_after("1h") + msg := "granting access for 1 hour" +} diff --git a/max-grant-duration/1w/.manifest b/max-grant-duration/1w/.manifest new file mode 100644 index 0000000..eac43c6 --- /dev/null +++ b/max-grant-duration/1w/.manifest @@ -0,0 +1 @@ +{ "roots": ["policy"] } diff --git a/max-grant-duration/1w/policy.rego b/max-grant-duration/1w/policy.rego new file mode 100644 index 0000000..850a70d --- /dev/null +++ b/max-grant-duration/1w/policy.rego @@ -0,0 +1,8 @@ +package time + +import data.abbey.functions + +allow[msg] { + functions.expire_after("168h") + msg := "granting access for 1 week" +} diff --git a/max-grant-duration/8h/.manifest b/max-grant-duration/8h/.manifest new file mode 100644 index 0000000..eac43c6 --- /dev/null +++ b/max-grant-duration/8h/.manifest @@ -0,0 +1 @@ +{ "roots": ["policy"] } diff --git a/max-grant-duration/8h/policy.rego b/max-grant-duration/8h/policy.rego new file mode 100644 index 0000000..b4b6345 --- /dev/null +++ b/max-grant-duration/8h/policy.rego @@ -0,0 +1,8 @@ +package time + +import data.abbey.functions + +allow[msg] { + functions.expire_after("8h") + msg := "granting access for 8 hours" +}