Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
Browse files Browse the repository at this point in the history
…ns-config-dev
  • Loading branch information
pujavs committed Jan 24, 2025
2 parents 2a8bf86 + 4ef6c9a commit dcdea5c
Show file tree
Hide file tree
Showing 38 changed files with 975 additions and 151 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -438,3 +438,61 @@ jobs:
gpg --armor --detach-sign cedarling_wasm_"${TAG}"_pkg.tar.gz || echo "Failed to sign"
echo "${{ secrets.MOAUTO_WORKFLOW_TOKEN }}" | gh auth login --with-token
gh release upload "${VERSION}" *.tar.gz *.sha256sum *.asc
build_cedarling_krakend:
if: github.repository == 'JanssenProject/jans'
runs-on: ubuntu-20.04
strategy:
matrix:
krakend-builder-image: [ 'builder:2.9.0', 'builder:2.9.0-linux-generic' ]
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Import GPG key
id: import_gpg
continue-on-error: true
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
with:
gpg_private_key: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Set environment variables
run: |
TAG=$(echo ${{ github.event.ref }} | cut -d '/' -f 3 | sed 's/^v//')
VERSION="$(echo ${{ github.event.ref }} | cut -d '/' -f 3)"
if [ "${TAG}" == "nightly" ]; then
VERSION=nightly
TAG="0.0.0"
fi
echo TAG=${TAG} >> $GITHUB_ENV
echo VERSION=${VERSION} >> $GITHUB_ENV
KRAKEND_BUILDER_IMAGE=${{ matrix.krakend-builder-image }}
KRAKEND_BUILDER_IMAGE=${KRAKEND_BUILDER_IMAGE/:/-}
echo KRAKEND_BUILDER_IMAGE=${KRAKEND_BUILDER_IMAGE} >> $GITHUB_ENV
echo CC="aarch64-linux-musl-gcc" >> $GITHUB_ENV
if [ "${{ matrix.krakend-builder-image }}" == "builder:2.9.0-linux-generic" ]; then
echo CC="aarch64-linux-gnu-gcc" >> $GITHUB_ENV
fi
- name: Build plugin for AMD64
working-directory: ${{ github.workspace }}/jans-cedarling/cedarling-krakend
run: |
docker run -i -v "$PWD:/app" -w /app krakend/"${{ matrix.krakend-builder-image }}" go build -buildmode=plugin -o cedarling-krakend-amd64-"${{ env.KRAKEND_BUILDER_IMAGE }}"-"${{ env.TAG }}".so .
- name: Build plugin for ARM64
working-directory: ${{ github.workspace }}/jans-cedarling/cedarling-krakend
run: |
docker run -i -v "$PWD:/app" -w /app -e "CGO_ENABLED=1" -e "CC=${{ env.CC }}" -e "GOARCH=arm64" -e "GOHOSTARCH=amd64" krakend/"${{ matrix.krakend-builder-image }}" go build -ldflags='-extldflags=-fuse-ld=bfd -extld=${{ env.CC }}' -buildmode=plugin -o cedarling-krakend-arm64-"${{ env.KRAKEND_BUILDER_IMAGE }}"-"${{ env.TAG }}".so .
- name: Generate sha256sum and sign
working-directory: ${{ github.workspace }}/jans-cedarling/cedarling-krakend
run: |
sha256sum cedarling-krakend-amd64-"${{ env.KRAKEND_BUILDER_IMAGE }}"-"${{ env.TAG }}".so >> cedarling-krakend-amd64-"${{ env.KRAKEND_BUILDER_IMAGE }}"-"${{ env.TAG }}".so.sha256sum
sha256sum cedarling-krakend-arm64-"${{ env.KRAKEND_BUILDER_IMAGE }}"-"${{ env.TAG }}".so >> cedarling-krakend-arm64-"${{ env.KRAKEND_BUILDER_IMAGE }}"-"${{ env.TAG }}".so.sha256sum
gpg --armor --detach-sign cedarling-krakend-amd64-"${{ env.KRAKEND_BUILDER_IMAGE }}"-"${{ env.TAG }}".so || echo "Failed to sign"
gpg --armor --detach-sign cedarling-krakend-arm64-"${{ env.KRAKEND_BUILDER_IMAGE }}"-"${{ env.TAG }}".so || echo "Failed to sign"
echo "${{ secrets.MOAUTO_WORKFLOW_TOKEN }}" | gh auth login --with-token
gh release upload "${{ env.VERSION }}" *.so *.sha256sum *.asc
4 changes: 2 additions & 2 deletions agama/misc/finished.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

<p class="my-4">Redirecting you...

<form action="${webCtx.contextPath}/postlogin.htm" method="post">
<form action="${webCtx.contextPath}/${data.post_finish_url}" method="post">
<noscript>
<p>Your browser does not seem to support Javascript. Click on the button below to be redirected
<p><input type="submit" class="btn btn-success px-4" value="Continue">
</noscript>
</form>

<script>
function submit() {
document.forms[0].submit()
Expand Down
2 changes: 1 addition & 1 deletion agama/misc/json_finished.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"success": ${success?c},
<#if success>
"finish_post_url": "${webCtx.contextPath}/postlogin.htm"
"post_finish_url": "${webCtx.contextPath}/${data.post_finish_url}"
<#else>
"error": "${jt.escStr(error!"")}"
</#if>
Expand Down
162 changes: 76 additions & 86 deletions demos/jans-tarp/src/options/helpDrawer.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import Drawer from '@mui/material/Drawer';
import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import CardMedia from '@mui/material/CardMedia';
import Typography from '@mui/material/Typography';

export default function HelpDrawer({ isOpen, handleDrawer }) {
const [open, setOpen] = React.useState(isOpen);

const [width, setWidth] = React.useState((window.innerWidth * 2)/3 )
React.useEffect(() => {
handleDrawer(isOpen)
setOpen(isOpen);
Expand All @@ -20,88 +17,81 @@ export default function HelpDrawer({ isOpen, handleDrawer }) {
};

const DrawerList = (
<>
<Box sx={{ width: 1184 }} role="presentation">
<Card sx={{ maxWidth: 1184 }}>
<CardContent>
<Typography gutterBottom variant="h5" component="div">
Step 1
</Typography>
<Typography variant="body2" color="text.secondary">
Click on 'Add Client' button for Dynamic Client Registration on authentication server.
</Typography>
</CardContent>
<CardMedia
sx={{ height: 266 }}
image={'tarpDocs1.png'}
/>
</Card>
</Box>
<Box sx={{ width: 586 }} role="presentation">
<Card sx={{ maxWidth: 586 }}>
<CardContent>
<Typography gutterBottom variant="h5" component="div">
Step 2
</Typography>
<Typography variant="body2" color="text.secondary">
On registration form enter details and register.
</Typography>
</CardContent>
<CardMedia
sx={{ height: 445 }}
image={'tarpDocs2.png'}
/>
</Card>
</Box>
<Box sx={{ width: 1184 }} role="presentation">
<Card sx={{ maxWidth: 1184 }}>
<CardContent>
<Typography gutterBottom variant="h5" component="div">
Step 3
</Typography>
<Typography variant="body2" color="text.secondary">
Trigger authentication flow.
</Typography>
</CardContent>
<CardMedia
sx={{ height: 266 }}
image={'tarpDocs3.png'}
/>
</Card>
</Box>
<Box sx={{ width: 575 }} role="presentation">
<Card sx={{ maxWidth: 575 }}>
<CardContent>
<Typography gutterBottom variant="h5" component="div">
Step 4
</Typography>
<Typography variant="body2" color="text.secondary">
The Registered client can be used to trigger authentication flow until it is expired.
</Typography>
</CardContent>
<CardMedia
sx={{ height: 459 }}
image={'tarpDocs4.png'}
/>
</Card>
</Box>
<Box sx={{ width: 575 }} role="presentation">
<Card sx={{ maxWidth: 575 }}>
<CardContent>
<Typography gutterBottom variant="h5" component="div">
Optional
</Typography>
<Typography variant="body2" color="text.secondary">
For <b>'Acr Values'</b> input, you can also add a new ACR option.
</Typography>
</CardContent>
<CardMedia
sx={{ height: 459 }}
image={'tarpDocs5.png'}
/>
</Card>
</Box>
</>

<Box sx={{ width: width }} role="presentation">
<div style={{ padding: "20px" }}>
<Typography gutterBottom variant="h5" component="div">
Step 1
</Typography>
<Typography variant="body2" color="text.secondary">
Click on 'Add Client' button for Dynamic Client Registration on authentication server.
</Typography>
</div>
<div className="image-container">
<img id="dynamic-image" src={'tarpDocs1.png'} />
</div>

<div style={{ padding: "20px" }}>
<Typography gutterBottom variant="h5" component="div">
Step 2
</Typography>
<Typography variant="body2" color="text.secondary">
On registration form enter details and register.
</Typography>
</div>
<div className="image-container">
<img id="dynamic-image" src={'tarpDocs2.png'} />
</div>

<div style={{ padding: "20px" }}>
<Typography gutterBottom variant="h5" component="div">
Step 3 (Optional: For Cedarlig authorization testing)
</Typography>
<Typography variant="body2" color="text.secondary">
Add Cedarling bootstrap configuration on <b>Cedarling</b> tab.
</Typography>
</div>
<div className="image-container">
<img id="dynamic-image" src={'tarpDocs3.png'} />
</div>

<div style={{ padding: "20px" }}>
<Typography gutterBottom variant="h5" component="div">
Step 4
</Typography>
<Typography variant="body2" color="text.secondary">
Start Authentication code flow.
</Typography>
</div>
<div className="image-container">
<img id="dynamic-image" src={'tarpDocs4.png'} />
</div>

<div style={{ padding: "20px" }}>
<Typography gutterBottom variant="h5" component="div">
Step 5
</Typography>
<Typography variant="body2" color="text.secondary">
Enter required details before starting Authentication Code flow.
</Typography>
</div>
<div className="image-container">
<img id="dynamic-image" src={'tarpDocs5.png'} />
</div>

<div style={{ padding: "20px" }}>
<Typography gutterBottom variant="h5" component="div">
Step 6 (Optional: For Cedarlig authorization testing)
</Typography>
<Typography variant="body2" color="text.secondary">
After authentication, test Cedarling Authorization decision using following request form.
</Typography>
</div>
<div className="image-container">
<img id="dynamic-image" src={'tarpDocs6.png'} />
</div>
</Box>

);

return (
Expand Down
11 changes: 11 additions & 0 deletions demos/jans-tarp/src/options/options.css
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ label.light {
z-index: 1; /* Ensure loader stays above the form */
}

.image-container {
display: flex;
flex-direction: column; /* Stack content vertically */
align-items: center; /* Optional: Center align other content */
}

.image-container img {
max-width: 100%; /* Ensure responsiveness */
height: auto;
}

@media screen and (min-width: 480px) {

form {
Expand Down
Binary file modified demos/jans-tarp/src/static/tarpDocs1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demos/jans-tarp/src/static/tarpDocs2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demos/jans-tarp/src/static/tarpDocs3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demos/jans-tarp/src/static/tarpDocs4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demos/jans-tarp/src/static/tarpDocs5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demos/jans-tarp/src/static/tarpDocs6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions demos/jans-tarp/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ const assetArr = [{
},
{
from: path.resolve('src/static/tarpDocs5.png')
},
{
from: path.resolve('src/static/tarpDocs6.png')
}];

const chromeConfig = merge(commonConfig, {
Expand Down
Loading

0 comments on commit dcdea5c

Please sign in to comment.