smb-kerberos.yml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. name: Samba Kerberos SSO
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - stable*
  7. paths:
  8. - 'apps/files_external/**'
  9. - '.github/workflows/smb-kerberos.yml'
  10. pull_request:
  11. paths:
  12. - 'apps/files_external/**'
  13. - '.github/workflows/smb-kerberos.yml'
  14. jobs:
  15. smb-kerberos-tests:
  16. runs-on: ubuntu-latest
  17. if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
  18. steps:
  19. - name: Checkout server
  20. uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
  21. with:
  22. submodules: true
  23. - name: Checkout user_saml
  24. uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
  25. with:
  26. repository: nextcloud/user_saml
  27. path: apps/user_saml
  28. - name: Pull images
  29. run: |
  30. docker pull ghcr.io/icewind1991/samba-krb-test-dc
  31. docker pull ghcr.io/icewind1991/samba-krb-test-apache
  32. docker pull ghcr.io/icewind1991/samba-krb-test-client
  33. docker tag ghcr.io/icewind1991/samba-krb-test-dc icewind1991/samba-krb-test-dc
  34. docker tag ghcr.io/icewind1991/samba-krb-test-apache icewind1991/samba-krb-test-apache
  35. docker tag ghcr.io/icewind1991/samba-krb-test-client icewind1991/samba-krb-test-client
  36. - name: Setup AD-DC
  37. run: |
  38. DC_IP=$(apps/files_external/tests/sso-setup/start-dc.sh)
  39. sleep 1
  40. apps/files_external/tests/sso-setup/start-apache.sh $DC_IP $PWD
  41. echo "DC_IP=$DC_IP" >> $GITHUB_ENV
  42. - name: Set up Nextcloud
  43. run: |
  44. apps/files_external/tests/sso-setup/setup-sso-nc.sh
  45. - name: Test SSO
  46. run: |
  47. apps/files_external/tests/sso-setup/test-sso-smb.sh ${{ env.DC_IP }}
  48. - name: Show logs
  49. if: failure()
  50. run: |
  51. FILEPATH=$(docker exec --user 33 apache ./occ log:file | grep "Log file:" | cut -d' ' -f3)
  52. echo "$FILEPATH:"
  53. docker exec --user 33 apache cat $FILEPATH
  54. smb-kerberos-session-tests:
  55. runs-on: ubuntu-latest
  56. if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
  57. steps:
  58. - name: Checkout server
  59. uses: actions/checkout@v3
  60. with:
  61. submodules: true
  62. - name: Checkout user_saml
  63. uses: actions/checkout@v3
  64. with:
  65. repository: nextcloud/user_saml
  66. path: apps/user_saml
  67. - name: Pull images
  68. run: |
  69. docker pull ghcr.io/icewind1991/samba-krb-test-dc
  70. docker pull ghcr.io/icewind1991/samba-krb-test-apache
  71. docker pull ghcr.io/icewind1991/samba-krb-test-client
  72. docker tag ghcr.io/icewind1991/samba-krb-test-dc icewind1991/samba-krb-test-dc
  73. docker tag ghcr.io/icewind1991/samba-krb-test-apache icewind1991/samba-krb-test-apache
  74. docker tag ghcr.io/icewind1991/samba-krb-test-client icewind1991/samba-krb-test-client
  75. - name: Setup AD-DC
  76. run: |
  77. DC_IP=$(apps/files_external/tests/sso-setup/start-dc.sh)
  78. sleep 1
  79. apps/files_external/tests/sso-setup/start-apache.sh $DC_IP $PWD -v $PWD/apps/files_external/tests/sso-setup/apache-session.conf:/etc/apache2/sites-enabled/000-default.conf
  80. echo "DC_IP=$DC_IP" >> $GITHUB_ENV
  81. - name: Set up Nextcloud
  82. run: |
  83. apps/files_external/tests/sso-setup/setup-sso-nc.sh smb::kerberos_sso_session
  84. - name: Test SSO
  85. run: |
  86. apps/files_external/tests/sso-setup/test-sso-smb-session.sh ${{ env.DC_IP }}
  87. - name: Show logs
  88. if: failure()
  89. run: |
  90. FILEPATH=$(docker exec --user 33 apache ./occ log:file | grep "Log file:" | cut -d' ' -f3)
  91. echo "$FILEPATH:"
  92. docker exec --user 33 apache cat $FILEPATH
  93. smb-kerberos-database-tests:
  94. runs-on: ubuntu-latest
  95. if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
  96. steps:
  97. - name: Checkout server
  98. uses: actions/checkout@v3
  99. with:
  100. submodules: true
  101. - name: Checkout user_saml
  102. uses: actions/checkout@v3
  103. with:
  104. repository: nextcloud/user_saml
  105. path: apps/user_saml
  106. - name: Pull images
  107. run: |
  108. docker pull ghcr.io/icewind1991/samba-krb-test-dc
  109. docker pull ghcr.io/icewind1991/samba-krb-test-apache
  110. docker pull ghcr.io/icewind1991/samba-krb-test-client
  111. docker tag ghcr.io/icewind1991/samba-krb-test-dc icewind1991/samba-krb-test-dc
  112. docker tag ghcr.io/icewind1991/samba-krb-test-apache icewind1991/samba-krb-test-apache
  113. docker tag ghcr.io/icewind1991/samba-krb-test-client icewind1991/samba-krb-test-client
  114. - name: Setup AD-DC
  115. run: |
  116. DC_IP=$(apps/files_external/tests/sso-setup/start-dc.sh)
  117. sleep 1
  118. apps/files_external/tests/sso-setup/start-apache.sh $DC_IP $PWD -v $PWD/apps/files_external/tests/sso-setup/apache-session.conf:/etc/apache2/sites-enabled/000-default.conf
  119. echo "DC_IP=$DC_IP" >> $GITHUB_ENV
  120. - name: Set up Nextcloud
  121. run: |
  122. apps/files_external/tests/sso-setup/setup-sso-nc.sh smb::kerberos_sso_database
  123. - name: Test SSO
  124. run: |
  125. apps/files_external/tests/sso-setup/test-sso-smb-session.sh ${{ env.DC_IP }}
  126. - name: Show logs
  127. if: failure()
  128. run: |
  129. FILEPATH=$(docker exec --user 33 apache ./occ log:file | grep "Log file:" | cut -d' ' -f3)
  130. echo "$FILEPATH:"
  131. docker exec --user 33 apache cat $FILEPATH