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
10 changes: 2 additions & 8 deletions docker-compose.yml → compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
version: "3.3"

services:
ldap:
# https://github.com/bitnami/containers/tree/main/bitnami/openldap#readme
image: bitnami/openldap:latest
platform: linux
environment:
- LDAP_USERS=user01,user02,nobody
- LDAP_PASSWORDS=password,password,password
image: test-ldap:latest
build: src/ldap
logging:
options:
tag: "ldap"
Expand Down
2 changes: 1 addition & 1 deletion src/idp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM tier/shib-idp:latest
FROM i2incommon/shib-idp:latest
RUN sed -i 's/SAML2\.ECP/SAML2\.ECP\.MDDriven/' /opt/shibboleth-idp/conf/relying-party.xml
COPY ./idp-configs/ /opt/shibboleth-idp/
10 changes: 9 additions & 1 deletion src/integration_tests/tests/configure.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ load 'clean'
assert_not_exists "$AWS_SHARED_CREDENTIALS_FILE"
assert_not_exists "$AWSCLI_LOGIN_ROOT/.awscli-login/config"

export AWS_REGION=us-east-1
export AWS_ENDPOINT_URL="http://127.0.0.1:8888" # Avoid bothering AWS

run aws login
assert_failure
assert_line --partial "aws: error: argument command: Invalid choice"
if [ -v AWSCLI_TEST_V2 ]; then
# New behavior: SSO always attempted in V2 with invalid credentials.
assert_line --partial "Attempting to open your default browser."
else
assert_line --partial "aws: error: argument command: Invalid choice"
fi
}

@test "Enable plugin in ~/.aws/config" {
Expand Down
7 changes: 7 additions & 0 deletions src/ldap/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM alpine:latest
RUN apk add --no-cache openldap openldap-back-mdb
COPY ./slapd.conf /etc/openldap/slapd.conf
COPY ./users.ldif /
RUN slapadd -l /users.ldif
EXPOSE 1389
ENTRYPOINT ["slapd", "-d256", "-h", "ldap://0.0.0.0:1389"]
18 changes: 18 additions & 0 deletions src/ldap/slapd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema

modulepath /usr/lib/openldap
moduleload back_mdb.so

database config
database mdb
maxsize 1073741824
suffix "dc=example,dc=org"
rootdn "cn=Manager,dc=example,dc=org"
rootpw secret
directory /var/lib/openldap/openldap-data
index objectClass eq

database monitor
45 changes: 45 additions & 0 deletions src/ldap/users.ldif
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
dn: dc=example,dc=org
objectClass: top
objectClass: domain
dc: example

dn: ou=users,dc=example,dc=org
objectClass: organizationalUnit
ou: users

dn: cn=user01,ou=users,dc=example,dc=org
cn: User
sn: 01
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword: password
uid: user01
uidNumber: 1001
gidNumber: 1001
homeDirectory: /home/user01

dn: cn=user02,ou=users,dc=example,dc=org
cn: User
sn: 02
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword: password
uid: user02
uidNumber: 1002
gidNumber: 1002
homeDirectory: /home/user02

dn: cn=nobody,ou=users,dc=example,dc=org
cn: Nobody
sn: Inparticular
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword: password
uid: nobody
uidNumber: 1003
gidNumber: 1003
homeDirectory: /home/nobody