From 8ab7509822dbe2364211aea01c7d87011d907bd4 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:48:06 +0800 Subject: [PATCH 1/4] [IDP-1218] add a custom user agent header to the mfa client --- application/common/components/MfaApiClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/common/components/MfaApiClient.php b/application/common/components/MfaApiClient.php index 487b492e..3cefe768 100644 --- a/application/common/components/MfaApiClient.php +++ b/application/common/components/MfaApiClient.php @@ -3,8 +3,8 @@ namespace common\components; use GuzzleHttp\Client as GuzzleClient; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\ClientException; +use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Exception\ServerException; use Psr\Http\Message\ResponseInterface; @@ -55,6 +55,7 @@ public function __construct(string $apiBaseUrl, $apiKey, $apiSecret) 'X-MFA-APIKey' => $apiKey, 'X-MFA-APISecret' => $apiSecret, 'Content-type' => 'application/json', + 'User-Agent' => 'idp-id-broker', ]; $this->client = new GuzzleClient([ @@ -118,7 +119,6 @@ public function validateTotp(string $uuid, string $code): bool } - /** * @param array $additionalHeaders * @return array From 7f2435e9f5568c76a5b9caf37d7b2eb54f480778 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:51:13 +0800 Subject: [PATCH 2/4] add a CODEOWNERS file --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..d7646b18 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @silinternational/php-devs From 7637adf1adf178fb4c6cf526c476853df46f5b04 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Fri, 13 Sep 2024 12:47:37 +0800 Subject: [PATCH 3/4] add some missing pieces to api.raml [skip ci] --- api.raml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api.raml b/api.raml index 83ce571d..94508a64 100644 --- a/api.raml +++ b/api.raml @@ -343,6 +343,11 @@ types: } /authentication: post: + queryParameters: + rpOrigin: + description: relying party origin + type: string + example: "https://sub.domain.com" body: type: Authentication responses: @@ -359,6 +364,10 @@ types: authentication failed). body: type: Error + 403: + description: The rpOrigin does not match any of the configured values. + body: + type: Error 410: description: > The invite has expired. A new code has been generated and emailed From dee4e74eee0ad0ca08d9f527b115e373f79a2321 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Tue, 17 Sep 2024 17:19:20 +0800 Subject: [PATCH 4/4] add semantic version tags to Docker image --- .github/workflows/test-and-publish.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-and-publish.yml b/.github/workflows/test-and-publish.yml index 6a6c4ba7..df26031c 100644 --- a/.github/workflows/test-and-publish.yml +++ b/.github/workflows/test-and-publish.yml @@ -3,9 +3,6 @@ name: Test and Publish on: push: -env: - IMAGE_NAME: ${{ vars.DOCKER_ORG }}/idp-id-broker - jobs: tests: name: Tests @@ -36,7 +33,11 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.IMAGE_NAME }} + images: ${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }} + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} - name: Build and push Docker image uses: docker/build-push-action@v5 with: