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
2 changes: 1 addition & 1 deletion .github/workflows/_docs_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 18
node-version: 20

- name: Install Yarn dependencies
uses: borales/[email protected]
Expand Down
1 change: 1 addition & 0 deletions bundler/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ async fn read_static_data(
Ok(data)
}

#[allow(dead_code)]
/// Combination of possible errors when fetching data to create bundle
#[derive(Debug, thiserror::Error)]
pub enum BundleDataError {
Expand Down
4 changes: 2 additions & 2 deletions charts/bundler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: bundler
description: A Open Policy Agent (OPA) Data Bundle Server providing permissionable data from ISPyB
type: application
version: 0.5.2
appVersion: 0.0.15
version: 0.5.3
appVersion: 0.0.16
maintainers:
- name: garryod
email: "garry.o'[email protected]"
Expand Down
1 change: 1 addition & 0 deletions charts/bundler/static/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"tomo_admin": [],
"xpdf_admin": ["i15", "i15-1"],

"b01-1_admin": ["b01-1"],
"b07_admin": ["b07"],
"b16_admin": ["b16"],
"b18_admin": ["b18"],
Expand Down
2 changes: 1 addition & 1 deletion charts/opa/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: opa
description: An OPA deployment to run alongside applications requiring authorization
type: application
version: 0.6.4
version: 0.6.5
appVersion: 0.59.0
maintainers:
- name: garryod
Expand Down
2 changes: 1 addition & 1 deletion charts/opa/templates/opa-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ data:
{{- if .Values.orgPolicy.enabled }}
diamond-policies:
service: ghcr
resource: ghcr.io/diamondlightsource/authz-policy:0.0.15
resource: ghcr.io/diamondlightsource/authz-policy:0.0.16
polling:
min_delay_seconds: 30
max_delay_seconds: 120
Expand Down
10 changes: 6 additions & 4 deletions policy/diamond/policy/admin/admin.rego
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import rego.v1

is_admin[subject] := "super_admin" in data.diamond.data.subjects[subject].permissions

beamline_admin_for_subject[subject] contains beamline if {
some subject
some role in data.diamond.data.subjects[subject].permissions
some beamline in data.diamond.data.admin[role]
beamline_admin_for_subject[subject_name] contains beamline if {
some subject_name, subject in data.diamond.data.subjects
some subject_role in subject.permissions
some role, role_beamlines in data.diamond.data.admin
subject_role == role
some beamline in role_beamlines
}

admin := is_admin[token.claims.fedid] # regal ignore:rule-name-repeats-package
Expand Down
7 changes: 7 additions & 0 deletions regal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@ rules:
idiomatic:
no-defined-entrypoint:
level: ignore

imports:
unresolved-reference:
level: error
except-paths:
- data.diamond.data
- data.diamond.data.*
Loading