-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub CI workflow for kerberos. Refs #17
- verifies web login with kerberos
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: kerberos | ||
|
||
# NOTE: Restricting branches prevents jobs from being doubled since | ||
# a push to a pull request triggers two events. | ||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
name: Test with Kerberos | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build & start services | ||
run: | | ||
make build-services | ||
make run-services | ||
- name: Install & configure Kerberos client | ||
run: | | ||
KRB5_ADDR=`docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' krb5_kiwitcms_org` | ||
sudo apt-get -y install krb5-user | ||
sudo cp ./tests/krb5/krb5.conf /etc/ | ||
sudo sed -i "s/localhost\./$KRB5_ADDR/" /etc/krb5.conf | ||
# this directory is missing and krb5.conf wants to include it | ||
sudo mkdir /etc/krb5.conf.d/ | ||
WEB_ADDR=`docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' web_kiwitcms_org` | ||
sudo sh -c "echo '$WEB_ADDR web.kiwitcms.org' >> /etc/hosts" | ||
- name: Obtain valid Kerberos ticket | ||
run: | | ||
echo changeme | kinit travis@KIWITCMS.ORG | ||
klist | ||
- name: Verify web login with Kerberos | ||
run: | | ||
make verify-web-login | ||
klist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters