Skip to content

Commit a266fd1

Browse files
committed
merge: branch 'main' into jans-cedarling-per-lang-examples
Signed-off-by: rmarinn <[email protected]>
2 parents e8010ef + aa2f1bb commit a266fd1

File tree

163 files changed

+3245
-875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+3245
-875
lines changed

.github/workflows/build-docker-image.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
egress-policy: audit
5858

5959
- name: Install Cosign
60-
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
60+
uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
6161

6262
- name: Checkout
6363
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -167,7 +167,7 @@ jobs:
167167
# UPDATE BUILD DATES INSIDE THE DOCKERFILE BEFORE BUILDING THE DEV IMAGES TRIGGERED BY JENKINS
168168
- name: Setup Python 3.10
169169
if: github.event_name == 'workflow_dispatch' && ${{ matrix.docker-images }} != 'loadtesting-jmeter'
170-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
170+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
171171
with:
172172
python-version: "3.10"
173173

@@ -190,7 +190,7 @@ jobs:
190190

191191
- name: Set up QEMU
192192
if: steps.build_docker_image.outputs.build && steps.prep.outputs.build
193-
uses: docker/setup-qemu-action@5306bad0baa6b616b9934712d4eba8da2112606d # master
193+
uses: docker/setup-qemu-action@737ba1e397ec2caff0d098f75e1136f9a926dc0a # master
194194
with:
195195
image: tonistiigi/binfmt:master
196196
platforms: all

.github/workflows/build-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
token: ${{ secrets.MOAUTO_WORKFLOW_TOKEN }}
5252

5353
- name: Set up Python 3.10
54-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
54+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
5555
with:
5656
python-version: "3.10"
5757
cache: pip

.github/workflows/build-packages.yml

Lines changed: 120 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
sudo ./run-build.sh
127127
128128
- name: Install Cosign
129-
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
129+
uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
130130

131131
- name: Sign package
132132
id: sign_package
@@ -208,7 +208,7 @@ jobs:
208208
mv jans-cli-tui.pyz jans-cli-tui-linux-suse-X86-64.pyz
209209
sha256sum jans-cli-tui-linux-suse-X86-64.pyz > jans-cli-tui-linux-suse-X86-64.pyz.sha256sum
210210
- name: Set up Python 3.8
211-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
211+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
212212
with:
213213
python-version: 3.8
214214
- name: Build with Ubuntu
@@ -398,7 +398,7 @@ jobs:
398398
git_user_signingkey: true
399399
git_commit_gpgsign: true
400400

401-
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
401+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
402402
- uses: PyO3/maturin-action@ea5bac0f1ccd0ab11c805e2b804bfcb65dac2eab # v1.45.0
403403
with:
404404
working-directory: ${{ github.workspace }}/jans-cedarling/bindings/cedarling_python
@@ -546,3 +546,120 @@ jobs:
546546
gpg --armor --detach-sign cedarling-krakend-arm64-"${{ env.KRAKEND_BUILDER_IMAGE }}"-"${{ env.TAG }}".so || echo "Failed to sign"
547547
echo "${{ secrets.MOAUTO_WORKFLOW_TOKEN }}" | gh auth login --with-token
548548
gh release upload "${{ env.VERSION }}" *.so *.sha256sum *.asc
549+
build_cedarling_go:
550+
if: github.repository == 'JanssenProject/jans'
551+
runs-on: ${{ matrix.os }}
552+
strategy:
553+
fail-fast: false
554+
matrix:
555+
name: [ubuntu22, mac, windows]
556+
include:
557+
- name: ubuntu22
558+
os: ubuntu-22.04
559+
- name: mac
560+
os: macos-15
561+
- name: windows
562+
os: windows-2025
563+
steps:
564+
- name: Harden Runner
565+
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
566+
with:
567+
egress-policy: audit
568+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
569+
- name: Import GPG key
570+
id: import_gpg
571+
continue-on-error: true
572+
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
573+
with:
574+
gpg_private_key: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY }}
575+
passphrase: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY_PASSPHRASE }}
576+
git_user_signingkey: true
577+
git_commit_gpgsign: true
578+
- name: Install Golang dependencies
579+
uses: actions/setup-go@v5
580+
with:
581+
go-version: '1.24'
582+
- name: Build rust artifacts linux
583+
working-directory: ${{ github.workspace }}/jans-cedarling/bindings/cedarling_go
584+
if: matrix.name == 'ubuntu22'
585+
run: |
586+
rustup update stable && rustup default stable
587+
TAG=$(echo ${{ github.event.ref }} | cut -d '/' -f 3 | sed 's/^v//')
588+
VERSION="$(echo ${{ github.event.ref }} | cut -d '/' -f 3)"
589+
if [ "${TAG}" == "nightly" ]; then
590+
VERSION=nightly
591+
TAG="0.0.0"
592+
fi
593+
cargo build -r -p cedarling_go
594+
cp ../../target/release/libcedarling_go.so libcedarling_go-${TAG}.so
595+
- name: Build rust artifacts mac
596+
working-directory: ${{ github.workspace }}/jans-cedarling/bindings/cedarling_go
597+
if: matrix.name == 'mac'
598+
run: |
599+
brew install rustup
600+
rustup update stable && rustup default stable
601+
TAG=$(echo ${{ github.event.ref }} | cut -d '/' -f 3 | sed 's/^v//')
602+
VERSION="$(echo ${{ github.event.ref }} | cut -d '/' -f 3)"
603+
if [ "${TAG}" == "nightly" ]; then
604+
VERSION=nightly
605+
TAG="0.0.0"
606+
fi
607+
cargo build -r -p cedarling_go
608+
cp ../../target/release/libcedarling_go.dylib libcedarling_go-${TAG}.dylib
609+
- name: Build rust artifacts windows
610+
working-directory: ${{ github.workspace }}/jans-cedarling/bindings/cedarling_go
611+
if: matrix.name == 'windows'
612+
shell: bash
613+
run: |
614+
choco install rustup.install
615+
rustup update stable && rustup default stable
616+
TAG=$(echo ${{ github.event.ref }} | cut -d '/' -f 3 | sed 's/^v//')
617+
VERSION="$(echo ${{ github.event.ref }} | cut -d '/' -f 3)"
618+
if [ "${TAG}" = "nightly" ]; then
619+
VERSION=nightly
620+
TAG="0.0.0"
621+
fi
622+
cargo build -r -p cedarling_go
623+
cp ../../target/release/cedarling_go.dll cedarling_go-${TAG}.dll
624+
cp ../../target/release/cedarling_go.dll.lib cedarling_go-${TAG}.lib
625+
626+
- name: Generate sha256sum and sign
627+
working-directory: ${{ github.workspace }}/jans-cedarling/bindings/cedarling_go
628+
shell: bash
629+
run: |
630+
TAG=$(echo ${{ github.event.ref }} | cut -d '/' -f 3 | sed 's/^v//')
631+
VERSION="$(echo ${{ github.event.ref }} | cut -d '/' -f 3)"
632+
if [ "${TAG}" = "nightly" ]; then
633+
VERSION=nightly
634+
TAG="0.0.0"
635+
fi
636+
637+
case "${{ matrix.name }}" in
638+
ubuntu22)
639+
FILE="libcedarling_go-${TAG}.so"
640+
;;
641+
mac)
642+
FILE="libcedarling_go-${TAG}.dylib"
643+
;;
644+
windows)
645+
FILE="cedarling_go-${TAG}.dll"
646+
FILE_LIB="cedarling_go-${TAG}.lib"
647+
;;
648+
esac
649+
650+
sha256sum $FILE >> $FILE.sha256sum
651+
gpg --armor --detach-sign $FILE || echo "Failed to sign"
652+
gpg --armor --detach-sign $FILE.sha256sum || echo "Failed to sign"
653+
654+
if [ -n "$FILE_LIB" ]; then
655+
sha256sum $FILE_LIB >> $FILE_LIB.sha256sum
656+
gpg --armor --detach-sign $FILE_LIB || echo "Failed to sign"
657+
gpg --armor --detach-sign $FILE_LIB.sha256sum || echo "Failed to sign"
658+
fi
659+
660+
echo "${{ secrets.MOAUTO_WORKFLOW_TOKEN }}" | gh auth login --with-token
661+
gh release upload "${VERSION}" $FILE $FILE.sha256sum $FILE.asc
662+
663+
if [ -n "$FILE_LIB" ]; then
664+
gh release upload "${VERSION}" $FILE_LIB $FILE_LIB.sha256sum $FILE_LIB.asc
665+
fi

.github/workflows/lint-flak8.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4040
- name: Set up Python 3.8
41-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
41+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4242
with:
4343
python-version: 3.8
4444
- name: Install dependencies

.github/workflows/ops-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
fetch-depth: 0
7373

7474
- name: Set up Python 3.10
75-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
75+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
7676
with:
7777
python-version: "3.10"
7878

.github/workflows/ops-label-pr-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3333

3434
- name: Set up Python 3.10
35-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
35+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3636
with:
3737
python-version: "3.10"
3838

.github/workflows/ops-sync-tf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3030

3131
- name: Set up Python 3.8
32-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
32+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3333
with:
3434
python-version: 3.8
3535

.github/workflows/test-cedarling.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
egress-policy: audit
6565
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6666
- name: Set up Python ${{ matrix.python-version }}
67-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
67+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
6868
with:
6969
python-version: ${{ matrix.python-version }}
7070
- name: Install dependencies
@@ -75,3 +75,31 @@ jobs:
7575
working-directory: jans-cedarling/bindings/cedarling_python
7676
run: |
7777
tox
78+
golang_tests:
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: Harden Runner
82+
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
83+
with:
84+
egress-policy: audit
85+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
86+
- name: Install Rust
87+
uses: dtolnay/rust-toolchain@1ff72ee08e3cb84d84adba594e0a297990fc1ed3 # stable
88+
- name: Install Golang dependencies
89+
uses: actions/setup-go@v5
90+
with:
91+
go-version: '1.24'
92+
- name: Run build rust artifacts
93+
working-directory: jans-cedarling/bindings/cedarling_go
94+
run: |
95+
cargo build -r -p cedarling_go
96+
cp "../../target/release/libcedarling_go.so" "."
97+
- name: Install Go dependencies
98+
working-directory: jans-cedarling/bindings/cedarling_go
99+
run: |
100+
go mod download && go mod tidy
101+
- name: Run golang tests
102+
working-directory: jans-cedarling/bindings/cedarling_go
103+
run: |
104+
export LD_LIBRARY_PATH="$(pwd):${LD_LIBRARY_PATH}"
105+
go test .

.github/workflows/test-jans-pycloudlib.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3838
- name: Set up Python ${{ matrix.python-version }}
39-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
39+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4040
with:
4141
python-version: ${{ matrix.python-version }}
4242
- name: Install dependencies

automation/startjanssendemo.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ if [[ -z $EXT_IP ]]; then
3636
fi
3737

3838
sudo apt-get update
39-
sudo apt-get install python3-pip -y
40-
sudo pip3 install requests --upgrade
41-
sudo pip3 install shiv
4239
sudo snap install microk8s --classic
4340
sudo microk8s.status --wait-ready
4441
sudo microk8s.enable dns registry ingress hostpath-storage helm3
@@ -193,4 +190,4 @@ EOF
193190
echo "Waiting for Janssen to come up. Please do not cancel out. This can take up to 5 minutes."
194191
sudo microk8s.kubectl -n jans wait --for=condition=available --timeout=300s deploy/janssen-auth-server --kubeconfig="$KUBECONFIG" || echo "auth-server deployment is not ready. Running tests anyways..."
195192
sudo bash testendpoints.sh
196-
echo -e "You may re-execute the command 'bash testendpoints.sh' to do a quick test to check the openid-configuration endpoint."
193+
echo -e "You may re-execute the command 'bash testendpoints.sh' to do a quick test to check the openid-configuration endpoint."

automation/startjanssenmonolithdemo.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ if [[ -z $EXT_IP ]]; then
1919
EXT_IP=$(curl ipinfo.io/ip)
2020
fi
2121

22+
if [[ -z $JANS_BUILD_COMMIT ]]; then
23+
JANS_BUILD_COMMIT="main"
24+
fi
25+
2226
wait_for_services() {
2327
code=404
2428
while [[ "$code" != "200" ]]; do
@@ -58,9 +62,7 @@ git clone --filter blob:none --no-checkout https://github.com/JanssenProject/jan
5862

5963
# -- Parse compose and docker file
6064
sudo apt-get update
61-
sudo python3 -m pip install --upgrade pip
62-
pip3 install setuptools --upgrade
63-
pip3 install dockerfile-parse ruamel.yaml
65+
PIP_BREAK_SYSTEM_PACKAGES=1 pip3 install dockerfile-parse ruamel.yaml
6466

6567
python3 -c "from dockerfile_parse import DockerfileParser ; dfparser = DockerfileParser('/tmp/jans/docker-jans-monolith') ; dfparser.envs['CN_HOSTNAME'] = '$JANS_FQDN'"
6668
# switching to version defined by JANS_BUILD_COMMIT

demos/benchmarking/docker-jans-loadtesting-jmeter/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# FROM blazemeter/taurus:master-f96971fa-2022-12-12
2-
FROM blazemeter/taurus:1.16.40@sha256:aa22ab6b42d24ec87ea9f68e4d6db9118619eecf69db76c1c0711f3515897780
2+
FROM blazemeter/taurus:1.16.41@sha256:e346b19420ca1d4e303a426172fef6611675e1a7e2a5a0327eb4c99ed08e5d97
33

44
# ===============
55
# Ubuntu packages

demos/janssen-tarp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ When you are testing Janssen IdP with self-signed cert then follow below steps b
5656

5757
## Testing using Janssen Tarp
5858

59-
* Setup Jans-Tarp. [Instructions](https://github.com/JanssenProject/jans/tree/main/demos/janssen-tarp)
59+
* Setup Janssen-Tarp. [Instructions](https://github.com/JanssenProject/jans/tree/main/demos/janssen-tarp)
6060
* Configuration to run Agama flow
6161
* Add Your Jans Auth server host , Client expiry date, Scopes and click on `Register` client. It will register new OP Client on your Auth server.
6262

demos/janssen-tarp/src/options/addCedarlingConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export default function AddCedarlingConfig({ isOpen, handleDialog, newData }) {
182182
{(!!errorMessage || errorMessage !== '') ?
183183
<Alert severity="error">{errorMessage}</Alert> : ''
184184
}
185-
<div style={{ display: 'flex', justifyContent: 'space-between', minWidth: '250px', maxWidth: 'min(600px, 90vw)' }}>
185+
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: 'min(600px, 90vw)' }}>
186186
<RadioGroup
187187
row
188188
aria-labelledby="demo-row-radio-buttons-group-label"

demos/janssen-tarp/src/options/cedarling.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ export default function CedarlingMgmt({ data, notifyOnDataChange, isLoggedIn })
9999
const [modelOpen, setModelOpen] = React.useState(false);
100100
const [drawerOpen, setDrawerOpen] = React.useState(false);
101101
const [screenType, setScreenType] = React.useState("config");
102+
const [cedarlingConfig, setCedarlingConfig] = React.useState([]);
103+
104+
React.useEffect(() => {
105+
setCedarlingConfig(data?.cedarlingConfig)
106+
}, [data])
102107

103108
const handleDialog = (isOpen) => {
104109
setModelOpen(isOpen);
@@ -122,12 +127,12 @@ export default function CedarlingMgmt({ data, notifyOnDataChange, isLoggedIn })
122127
<HelpDrawer isOpen={drawerOpen} handleDrawer={handleDrawer} />
123128
<Stack direction="column" spacing={2} sx={{ mb: 1 }}>
124129
<Stack direction="row" spacing={2} sx={{ mb: 1 }} style={{ display: 'flex', justifyContent: 'flex-end' }}>
125-
{(data === undefined || data?.length == 0) ?
130+
{(cedarlingConfig === undefined || cedarlingConfig?.length == 0) ?
126131
<Button color="success" variant="outlined" startIcon={<AddIcon />} onClick={() => setModelOpen(true)} style={{ maxWidth: '200px' }}>
127132
Add Configurations
128133
</Button> : ''}
129134
</Stack>
130-
{(data === undefined || data?.length == 0) ? '' :
135+
{(cedarlingConfig === undefined || cedarlingConfig?.length == 0) ? '' :
131136
<Box maxWidth="md">
132137
<ToggleButtonGroup
133138
color="primary"
@@ -155,14 +160,14 @@ export default function CedarlingMgmt({ data, notifyOnDataChange, isLoggedIn })
155160
</TableRow>
156161
</TableHead>
157162
<TableBody>
158-
{(data === undefined || data?.length == 0) ?
163+
{(cedarlingConfig === undefined || cedarlingConfig?.length == 0) ?
159164
<TableCell colSpan={6}><Alert severity="warning">No Records to show.</Alert></TableCell> :
160-
data.map((row, index) => (<Row key={index} row={row} notifyOnDataChange={notifyOnDataChange} />))
165+
cedarlingConfig.map((row, index) => (<Row key={index} row={row} notifyOnDataChange={notifyOnDataChange} />))
161166
}
162167
</TableBody>
163168
</Table>
164169
</TableContainer>)}
165-
{(data === undefined || data?.length == 0) ? '' :
170+
{(cedarlingConfig === undefined || cedarlingConfig?.length == 0) ? '' :
166171
(
167172
<>
168173
{screenType === 'unsignedAuthz' &&

0 commit comments

Comments
 (0)