diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ba775a534d64291955648e24da611f3c5a3cd99..43645ab3d49ad3517a70e607f9b12ac09b14dd08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ linters: - golangci-lint run unit tests: - image: golang:1.21.3 + image: golang:1.21.4 stage: test script: - go version @@ -23,7 +23,7 @@ unit tests: coverage: '/total:\s+\(statements\)\s+(\d+.\d+\%)/' govulncheck: - image: golang:1.21.3 + image: golang:1.21.4 stage: test script: - go version diff --git a/deployment/ci/Dockerfile b/deployment/ci/Dockerfile index 022f6797ff5f9d98e8019dfc70ae2060c902b949..b15f77b948866b29e9ebbb9437c1fde68c53aaab 100644 --- a/deployment/ci/Dockerfile +++ b/deployment/ci/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.3-alpine3.17 as builder +FROM golang:1.21.4-alpine3.17 as builder RUN apk add git diff --git a/deployment/compose/Dockerfile b/deployment/compose/Dockerfile index 0055fbf4996f8b27d1afb83e416cc297266ae6a4..39ce5b58496b0447f5edcc15bd1017ecc38842b6 100644 --- a/deployment/compose/Dockerfile +++ b/deployment/compose/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.3 +FROM golang:1.21.4 RUN go install github.com/ysmood/kit/cmd/guard@v0.25.11 diff --git a/docs/task.md b/docs/task.md index e016cfe24f470da680e04aa1076cf23f9451616f..aed81cbec2a2a2f2f2b08b1b67d2f5556ebfab90 100644 --- a/docs/task.md +++ b/docs/task.md @@ -13,7 +13,7 @@ an example of task template definition: "name":"exampleTask", "url":"https://jsonplaceholder.typicode.com/todos/1", "method":"GET", - "requestPolicy":"example/example/1.0", + "requestPolicy":"policies/example/example/1.0", "responsePolicy":"", "finalPolicy":"", "cacheNamespace":"login", diff --git a/internal/clients/policy/client.go b/internal/clients/policy/client.go index 4270f3a3daa37bdbb4b75da1a5dddb08568e13ae..1b7c4a56371e9fd156c45ebcb210f76cb8a7b5df 100644 --- a/internal/clients/policy/client.go +++ b/internal/clients/policy/client.go @@ -25,8 +25,8 @@ func New(addr string, httpClient *http.Client) *Client { // Evaluate calls the policy service to execute the given policy. // The policy is expected as a string path uniquely identifying the -// policy that has to be evaluated. For example, with policy = `xfsc/didResolve/1.0`, -// the client will do HTTP request to http://policyhost/policy/xfsc/didResolve/1.0/evaluation. +// policy that has to be evaluated. For example, with policy = `policies/xfsc/didResolve/1.0`, +// the client will do HTTP request to http://policyhost/policy/policies/xfsc/didResolve/1.0/evaluation. func (c *Client) Evaluate(ctx context.Context, policy string, data []byte) ([]byte, error) { uri := c.addr + "/policy/" + policy + "/evaluation" policyURL, err := url.ParseRequestURI(uri)