Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bd6d4572e0 | |||
| 78b215bb77 | |||
| 58428892a8 | |||
| 24b604ce51 | |||
| a02827a34b | |||
| 5b431f65dc | |||
| b5ee887387 | |||
| 75a35dbb85 |
+25
-5
@@ -262,10 +262,30 @@ jobs:
|
|||||||
needs: [test]
|
needs: [test]
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
container:
|
container:
|
||||||
image: alpine:latest
|
image: docker:27-cli
|
||||||
steps:
|
steps:
|
||||||
- name: Trigger Coolify deploy
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache curl
|
apk add --no-cache git curl openssl
|
||||||
curl -sf "${{ secrets.COOLIFY_WEBHOOK }}" \
|
git init
|
||||||
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}"
|
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
||||||
|
git fetch --depth=1 origin "${GITHUB_SHA}"
|
||||||
|
git checkout FETCH_HEAD
|
||||||
|
- name: Build and push image
|
||||||
|
run: |
|
||||||
|
IMAGE=registry.meghsakha.com/certifai-dashboard
|
||||||
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | \
|
||||||
|
docker login registry.meghsakha.com -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||||
|
docker build -t "$IMAGE:latest" -t "$IMAGE:${GITHUB_SHA}" .
|
||||||
|
docker push "$IMAGE:latest"
|
||||||
|
docker push "$IMAGE:${GITHUB_SHA}"
|
||||||
|
- name: Trigger orca redeploy
|
||||||
|
run: |
|
||||||
|
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"sharang/certifai"},"head_commit":{"id":"%s","message":"CI deploy"}}' "${GITHUB_SHA}")
|
||||||
|
SIG=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "${{ secrets.ORCA_WEBHOOK_SECRET }}" | awk '{print $2}')
|
||||||
|
echo "Calling orca webhook for sharang/certifai@${GITHUB_SHA}"
|
||||||
|
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "http://46.225.100.82:6880/api/v1/webhooks/github" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "X-Hub-Signature-256: sha256=$SIG" \
|
||||||
|
-d "$PAYLOAD")
|
||||||
|
echo "$RESP"
|
||||||
|
|||||||
Generated
+393
-332
File diff suppressed because it is too large
Load Diff
+202
-6
@@ -53,7 +53,7 @@
|
|||||||
"description": "CERTifAI administration dashboard",
|
"description": "CERTifAI administration dashboard",
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"publicClient": true,
|
"publicClient": true,
|
||||||
"directAccessGrantsEnabled": false,
|
"directAccessGrantsEnabled": true,
|
||||||
"standardFlowEnabled": true,
|
"standardFlowEnabled": true,
|
||||||
"implicitFlowEnabled": false,
|
"implicitFlowEnabled": false,
|
||||||
"serviceAccountsEnabled": false,
|
"serviceAccountsEnabled": false,
|
||||||
@@ -73,7 +73,8 @@
|
|||||||
"defaultClientScopes": [
|
"defaultClientScopes": [
|
||||||
"openid",
|
"openid",
|
||||||
"profile",
|
"profile",
|
||||||
"email"
|
"email",
|
||||||
|
"tenant-context"
|
||||||
],
|
],
|
||||||
"optionalClientScopes": [
|
"optionalClientScopes": [
|
||||||
"offline_access"
|
"offline_access"
|
||||||
@@ -106,7 +107,8 @@
|
|||||||
"defaultClientScopes": [
|
"defaultClientScopes": [
|
||||||
"openid",
|
"openid",
|
||||||
"profile",
|
"profile",
|
||||||
"email"
|
"email",
|
||||||
|
"tenant-context"
|
||||||
],
|
],
|
||||||
"optionalClientScopes": [
|
"optionalClientScopes": [
|
||||||
"offline_access"
|
"offline_access"
|
||||||
@@ -139,7 +141,8 @@
|
|||||||
"defaultClientScopes": [
|
"defaultClientScopes": [
|
||||||
"openid",
|
"openid",
|
||||||
"profile",
|
"profile",
|
||||||
"email"
|
"email",
|
||||||
|
"tenant-context"
|
||||||
],
|
],
|
||||||
"optionalClientScopes": [
|
"optionalClientScopes": [
|
||||||
"offline_access"
|
"offline_access"
|
||||||
@@ -269,6 +272,105 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tenant-context",
|
||||||
|
"description": "Breakpilot platform tenant + org claims (M7.1)",
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"attributes": {
|
||||||
|
"include.in.token.scope": "true",
|
||||||
|
"display.on.consent.screen": "false"
|
||||||
|
},
|
||||||
|
"protocolMappers": [
|
||||||
|
{
|
||||||
|
"name": "tenant_id",
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||||
|
"consentRequired": false,
|
||||||
|
"config": {
|
||||||
|
"user.attribute": "tenant_id",
|
||||||
|
"claim.name": "tenant_id",
|
||||||
|
"id.token.claim": "true",
|
||||||
|
"access.token.claim": "true",
|
||||||
|
"userinfo.token.claim": "true",
|
||||||
|
"jsonType.label": "String"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tenant_slug",
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||||
|
"consentRequired": false,
|
||||||
|
"config": {
|
||||||
|
"user.attribute": "tenant_slug",
|
||||||
|
"claim.name": "tenant_slug",
|
||||||
|
"id.token.claim": "true",
|
||||||
|
"access.token.claim": "true",
|
||||||
|
"userinfo.token.claim": "true",
|
||||||
|
"jsonType.label": "String"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tenant_status",
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||||
|
"consentRequired": false,
|
||||||
|
"config": {
|
||||||
|
"user.attribute": "tenant_status",
|
||||||
|
"claim.name": "tenant_status",
|
||||||
|
"id.token.claim": "true",
|
||||||
|
"access.token.claim": "true",
|
||||||
|
"userinfo.token.claim": "true",
|
||||||
|
"jsonType.label": "String"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "plan",
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||||
|
"consentRequired": false,
|
||||||
|
"config": {
|
||||||
|
"user.attribute": "plan",
|
||||||
|
"claim.name": "plan",
|
||||||
|
"id.token.claim": "true",
|
||||||
|
"access.token.claim": "true",
|
||||||
|
"userinfo.token.claim": "true",
|
||||||
|
"jsonType.label": "String"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "org_roles",
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||||
|
"consentRequired": false,
|
||||||
|
"config": {
|
||||||
|
"user.attribute": "org_roles",
|
||||||
|
"claim.name": "org_roles",
|
||||||
|
"id.token.claim": "true",
|
||||||
|
"access.token.claim": "true",
|
||||||
|
"userinfo.token.claim": "true",
|
||||||
|
"jsonType.label": "String",
|
||||||
|
"multivalued": "true",
|
||||||
|
"aggregate.attrs": "true"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "products",
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||||
|
"consentRequired": false,
|
||||||
|
"config": {
|
||||||
|
"user.attribute": "products",
|
||||||
|
"claim.name": "products",
|
||||||
|
"id.token.claim": "true",
|
||||||
|
"access.token.claim": "true",
|
||||||
|
"userinfo.token.claim": "true",
|
||||||
|
"jsonType.label": "String",
|
||||||
|
"multivalued": "true",
|
||||||
|
"aggregate.attrs": "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"users": [
|
"users": [
|
||||||
@@ -289,7 +391,15 @@
|
|||||||
"realmRoles": [
|
"realmRoles": [
|
||||||
"admin",
|
"admin",
|
||||||
"user"
|
"user"
|
||||||
]
|
],
|
||||||
|
"attributes": {
|
||||||
|
"tenant_id": ["00000000-0000-0000-0000-000000000001"],
|
||||||
|
"tenant_slug": ["acme"],
|
||||||
|
"tenant_status": ["active"],
|
||||||
|
"plan": ["professional"],
|
||||||
|
"org_roles": ["IT_ADMIN", "CXO"],
|
||||||
|
"products": ["compliance", "certifai"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"username": "user@certifai.local",
|
"username": "user@certifai.local",
|
||||||
@@ -307,7 +417,93 @@
|
|||||||
],
|
],
|
||||||
"realmRoles": [
|
"realmRoles": [
|
||||||
"user"
|
"user"
|
||||||
]
|
],
|
||||||
|
"attributes": {
|
||||||
|
"tenant_id": ["00000000-0000-0000-0000-000000000001"],
|
||||||
|
"tenant_slug": ["acme"],
|
||||||
|
"tenant_status": ["active"],
|
||||||
|
"plan": ["professional"],
|
||||||
|
"org_roles": ["USER"],
|
||||||
|
"products": ["compliance"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"username": "frozen@acme.local",
|
||||||
|
"email": "frozen@acme.local",
|
||||||
|
"firstName": "Frozen",
|
||||||
|
"lastName": "Tenant",
|
||||||
|
"enabled": true,
|
||||||
|
"emailVerified": true,
|
||||||
|
"credentials": [
|
||||||
|
{
|
||||||
|
"type": "password",
|
||||||
|
"value": "frozen",
|
||||||
|
"temporary": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"realmRoles": [
|
||||||
|
"user"
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"tenant_id": ["00000000-0000-0000-0000-000000000002"],
|
||||||
|
"tenant_slug": ["frozenco"],
|
||||||
|
"tenant_status": ["frozen"],
|
||||||
|
"plan": ["starter"],
|
||||||
|
"org_roles": ["IT_ADMIN"],
|
||||||
|
"products": ["compliance"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"username": "archived@acme.local",
|
||||||
|
"email": "archived@acme.local",
|
||||||
|
"firstName": "Archived",
|
||||||
|
"lastName": "Tenant",
|
||||||
|
"enabled": true,
|
||||||
|
"emailVerified": true,
|
||||||
|
"credentials": [
|
||||||
|
{
|
||||||
|
"type": "password",
|
||||||
|
"value": "archived",
|
||||||
|
"temporary": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"realmRoles": [
|
||||||
|
"user"
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"tenant_id": ["00000000-0000-0000-0000-000000000003"],
|
||||||
|
"tenant_slug": ["archiveco"],
|
||||||
|
"tenant_status": ["archived"],
|
||||||
|
"plan": ["starter"],
|
||||||
|
"org_roles": ["IT_ADMIN"],
|
||||||
|
"products": ["compliance"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"username": "trial@acme.local",
|
||||||
|
"email": "trial@acme.local",
|
||||||
|
"firstName": "Trial",
|
||||||
|
"lastName": "Tenant",
|
||||||
|
"enabled": true,
|
||||||
|
"emailVerified": true,
|
||||||
|
"credentials": [
|
||||||
|
{
|
||||||
|
"type": "password",
|
||||||
|
"value": "trial",
|
||||||
|
"temporary": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"realmRoles": [
|
||||||
|
"user"
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"tenant_id": ["00000000-0000-0000-0000-000000000004"],
|
||||||
|
"tenant_slug": ["trialco"],
|
||||||
|
"tenant_status": ["trial"],
|
||||||
|
"plan": ["starter"],
|
||||||
|
"org_roles": ["IT_ADMIN"],
|
||||||
|
"products": ["compliance"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user