Skip to content

Commit a6abf80

Browse files
committed
feat(integration): INT-08 Taiga OIDC docker test + CI
1 parent c7f34a0 commit a6abf80

4 files changed

Lines changed: 634 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,33 +235,39 @@ run: bash tests/labs/test-lab-15-01.sh
235235
run: docker compose -f docker/docker-compose.sso.yml down -v
236236

237237
lab-05-smoke:
238-
name: Lab 15-05 -- Taiga Advanced Integration (Mattermost Webhook)
238+
name: Lab 15-05 -- Taiga Advanced Integration (INT-08 Taiga<->Keycloak OIDC + LDAP)
239239
runs-on: ubuntu-latest
240240
needs: validate
241241
continue-on-error: true
242242
steps:
243243
- uses: actions/checkout@v4
244244

245245
- name: Install tools
246-
run: sudo apt-get install -y curl postgresql-client netcat-openbsd ldap-utils
246+
run: sudo apt-get install -y curl postgresql-client netcat-openbsd ldap-utils python3
247247

248248
- name: Validate integration compose
249249
run: docker compose -f docker/docker-compose.integration.yml config -q && echo "Integration compose valid"
250250

251251
- name: Start integration stack
252252
run: docker compose -f docker/docker-compose.integration.yml up -d
253253

254-
- name: Wait for WireMock
255-
run: timeout 90 bash -c 'until curl -sf http://localhost:8761/__admin/health; do sleep 5; done'
256-
257254
- name: Wait for PostgreSQL
258255
run: timeout 120 bash -c 'until docker exec taiga-i05-db pg_isready -U taiga > /dev/null 2>&1; do sleep 5; done'
259256

257+
- name: Wait for OpenLDAP
258+
run: timeout 120 bash -c 'until docker exec taiga-i05-ldap ldapsearch -x -H ldap://localhost -b dc=lab,dc=local -D cn=admin,dc=lab,dc=local -w LdapLab05! > /dev/null 2>&1; do sleep 5; done'
259+
260+
- name: Wait for LDAP seed to complete
261+
run: timeout 120 bash -c 'until docker inspect taiga-i05-ldap-seed --format "{{.State.Status}}" 2>/dev/null | grep -q exited; do sleep 5; done'
262+
260263
- name: Wait for Keycloak
261-
run: timeout 300 bash -c 'until curl -sf http://localhost:8540/realms/master; do sleep 10; done'
264+
run: timeout 300 bash -c 'until curl -sf http://localhost:8540/health/ready | grep -q UP; do sleep 10; done'
265+
266+
- name: Wait for WireMock
267+
run: timeout 90 bash -c 'until curl -sf http://localhost:8761/__admin/health; do sleep 5; done'
262268

263269
- name: Wait for Taiga Back
264-
run: timeout 300 bash -c 'until curl -sf http://localhost:8041/api/v1/ | grep -q version; do sleep 15; done'
270+
run: timeout 300 bash -c 'until curl -sf http://localhost:8041/api/v1/ > /dev/null 2>&1; do sleep 15; done'
265271

266272
- name: Run Lab 15-05 test script
267273
run: bash tests/labs/test-lab-15-05.sh --no-cleanup

docker/docker-compose.integration.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22
# IT-Stack: Taiga — Lab 05: Advanced Integration
33
# Module 15 · Phase 4 · Lab 05
44
# =============================================================================
5-
# Services: PostgreSQL · Redis · OpenLDAP · Keycloak · WireMock (Mattermost-mock)
5+
# Services: PostgreSQL · Redis · OpenLDAP · LDAP-Seed · Keycloak · WireMock
66
# Mailhog · Taiga Backend · Taiga Frontend
77
# Ports: Frontend:8440 Backend:8041 WireMock:8761 KC:8540 LDAP:3885 MH:8740
88
# Credentials:
99
# DB: taiga / TaigaLab05!
1010
# Keycloak: admin / Admin05!
11-
# LDAP: cn=admin,dc=lab,dc=local / LdapLab05!
11+
# LDAP: cn=admin,dc=lab,dc=local / LdapLab05! readonly: ReadOnly05!
12+
# LDAP users: taigaadmin/taigauser1/taigauser2 pw: Lab05Password!
1213
# What's new vs Lab 04:
13-
# + WireMock 3.x simulates Mattermost API (webhooks, DMs)
14-
# + Taiga back configured with MATTERMOST_URL for project notifications
15-
# + Integration tested: Taiga → Mattermost webhook (project events)
14+
# + INT-08 Keycloak OIDC SSO for Taiga (taiga-contrib-oidc-auth)
15+
# + LDAP seed init container (taiga-i05-ldap-seed) — FreeIPA-style tree
16+
# + KC depends on seed exit; OIDC client "taiga" configured in realm
17+
# + OIDC_DISCOVERY_URL env var added to Taiga Back for Ansible provisioner
1618
# =============================================================================
1719

1820
name: it-stack-taiga-lab05
@@ -94,6 +96,26 @@ services:
9496
memory: 256M
9597
cpus: "0.25"
9698

99+
# ── LDAP Seed (init container) ────────────────────────────────────────────
100+
taiga-i05-ldap-seed:
101+
image: osixia/openldap:1.5.0
102+
container_name: taiga-i05-ldap-seed
103+
entrypoint: ["/bin/sh", "-c"]
104+
command:
105+
- |
106+
sleep 5
107+
ldapadd -x -H ldap://taiga-i05-ldap:389 \
108+
-D cn=admin,dc=lab,dc=local -w LdapLab05! \
109+
-f /seed/taiga-ldap-seed.ldif && echo "LDAP seed complete" || echo "LDAP seed already exists (idempotent)"
110+
volumes:
111+
- ./taiga-ldap-seed.ldif:/seed/taiga-ldap-seed.ldif:ro
112+
depends_on:
113+
taiga-i05-ldap:
114+
condition: service_healthy
115+
networks:
116+
- taiga-i05-net
117+
restart: "no"
118+
97119
# ── Keycloak ───────────────────────────────────────────────────────────────
98120
taiga-i05-kc:
99121
image: quay.io/keycloak/keycloak:24.0.3
@@ -116,6 +138,9 @@ services:
116138
timeout: 10s
117139
retries: 20
118140
start_period: 30s
141+
depends_on:
142+
taiga-i05-ldap-seed:
143+
condition: service_completed_successfully
119144
networks:
120145
- taiga-i05-net
121146
deploy:
@@ -193,6 +218,7 @@ services:
193218
KEYCLOAK_REALM: it-stack
194219
KEYCLOAK_CLIENT_ID: taiga
195220
KEYCLOAK_CLIENT_SECRET: TaigaKCSecret05!
221+
OIDC_DISCOVERY_URL: http://taiga-i05-kc:8080/realms/it-stack/.well-known/openid-configuration
196222
LDAP_SERVER: taiga-i05-ldap
197223
LDAP_PORT: "389"
198224
LDAP_BASE_DN: dc=lab,dc=local

docker/taiga-ldap-seed.ldif

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# taiga-ldap-seed.ldif — INT-08 Taiga LDAP seed data
2+
# FreeIPA-style tree: cn=accounts, cn=users/groups inside it
3+
# Users: taigaadmin, taigauser1, taigauser2 (pw: Lab05Password!)
4+
# Groups: cn=admins (taigaadmin), cn=taiga-users (taigauser1, taigauser2)
5+
6+
dn: dc=lab,dc=local
7+
objectClass: top
8+
objectClass: dcObject
9+
objectClass: organization
10+
o: IT-Stack Lab
11+
dc: lab
12+
13+
dn: cn=accounts,dc=lab,dc=local
14+
objectClass: top
15+
objectClass: organizationalUnit
16+
ou: accounts
17+
18+
dn: cn=users,cn=accounts,dc=lab,dc=local
19+
objectClass: top
20+
objectClass: organizationalUnit
21+
ou: users
22+
23+
dn: cn=groups,cn=accounts,dc=lab,dc=local
24+
objectClass: top
25+
objectClass: organizationalUnit
26+
ou: groups
27+
28+
# ── Users ─────────────────────────────────────────────────────────────────────
29+
30+
dn: uid=taigaadmin,cn=users,cn=accounts,dc=lab,dc=local
31+
objectClass: top
32+
objectClass: inetOrgPerson
33+
objectClass: organizationalPerson
34+
objectClass: person
35+
uid: taigaadmin
36+
cn: Taiga Admin
37+
sn: Admin
38+
givenName: Taiga
39+
mail: taigaadmin@lab.local
40+
userPassword: Lab05Password!
41+
42+
dn: uid=taigauser1,cn=users,cn=accounts,dc=lab,dc=local
43+
objectClass: top
44+
objectClass: inetOrgPerson
45+
objectClass: organizationalPerson
46+
objectClass: person
47+
uid: taigauser1
48+
cn: Taiga User1
49+
sn: User1
50+
givenName: Taiga
51+
mail: taigauser1@lab.local
52+
userPassword: Lab05Password!
53+
54+
dn: uid=taigauser2,cn=users,cn=accounts,dc=lab,dc=local
55+
objectClass: top
56+
objectClass: inetOrgPerson
57+
objectClass: organizationalPerson
58+
objectClass: person
59+
uid: taigauser2
60+
cn: Taiga User2
61+
sn: User2
62+
givenName: Taiga
63+
mail: taigauser2@lab.local
64+
userPassword: Lab05Password!
65+
66+
# ── Groups ────────────────────────────────────────────────────────────────────
67+
68+
dn: cn=admins,cn=groups,cn=accounts,dc=lab,dc=local
69+
objectClass: top
70+
objectClass: groupOfNames
71+
cn: admins
72+
member: uid=taigaadmin,cn=users,cn=accounts,dc=lab,dc=local
73+
74+
dn: cn=taiga-users,cn=groups,cn=accounts,dc=lab,dc=local
75+
objectClass: top
76+
objectClass: groupOfNames
77+
cn: taiga-users
78+
member: uid=taigauser1,cn=users,cn=accounts,dc=lab,dc=local
79+
member: uid=taigauser2,cn=users,cn=accounts,dc=lab,dc=local

0 commit comments

Comments
 (0)