conjur-api 6.3.1.pre.848 → 6.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e94af8f767fd0324c87edb5648af755334c349670c1b4d50a2b4cec6927eb2f5
4
- data.tar.gz: e5a01b8576510b3f21209b2a75790ee6f37607c011a8d0937481386e78d0746f
3
+ metadata.gz: e7b56e1d0e5d393556c564aec43aed82569aee4fce4506f2781af39308dde858
4
+ data.tar.gz: 0e0f305d3ade218a69a327e0e7bb394ec70317719897942925fe13d4296a63b5
5
5
  SHA512:
6
- metadata.gz: 74c14463069c05daaa17c1c9aca5ffec2cc884835762c4a0bffaa0322158a3c09145badf7257b8bfdb19888b98b6298e548973111aa4463465da6f584621b95b
7
- data.tar.gz: 6ed18e8e9acb13891834d729cd1fc5a4b678942b548be8418c58480517b90b0b28870a0a966dd176e2302e41e8026880d77acbfebd9eb027c0cfb7c9e0fb280d
6
+ metadata.gz: 25cbc42d0c2b063b0eea9c575d2991fcb49c9097bb1b8b2389a3d718fe589aa0565b147053ec30aaa6696e0f340639fc8792ff8dfcc134dc9c075df9d6263178
7
+ data.tar.gz: 3aec2b8ee3ad4b6a58206dd50d8e3b57c369e370559518ccfcea6b0ee3a0b83a955430dbc6d1dc346447e4f0f9ccb490da406cb20126e4fe38297f5311f8ad72
data/CHANGELOG.md CHANGED
@@ -5,31 +5,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## Unreleased
8
- ### Added
9
- - Cloud-native authenticators for Azure Managed Identity (`authn-azure`),
10
- AWS IAM (`authn-iam`), and GCP workload identity (`authn-gcp`), exposed
11
- via `Conjur::API.new_from_azure`, `.new_from_iam`, and `.new_from_gcp`
12
- (CNJR-14213).
13
- - Live integration features for the cloud authenticators, gated behind the
14
- `RUN_AWS_TESTS` / `RUN_AZURE_TESTS` / `RUN_GCP_TESTS` pipeline params and run
15
- on dedicated cloud agents (excluded from the default suite) (CNJR-14213).
16
-
17
- ### Changed
18
- - CI uses Conjur Enterprise 1.27.0+, which removed the `GET /public_keys` endpoint
19
- (CNJR-11339). Dropped the Cucumber scenario that exercised that API; the client
20
- method remains for open-source Conjur.
21
- - Retrieve the Cucumber admin API key via `conjurctl` in `test.sh` instead of rake,
22
- avoiding Rails boot output corrupting the key on current Conjur images.
23
- - CI now tests against Ruby 3.3, 3.4, and 4.0. Dropped Ruby 3.2 (end of life)
24
- and raised the minimum supported Ruby version accordingly.
25
-
26
- ### Fixed
27
- - Set `CONJUR_AUTHN_ALLOWED_IP_RANGES` and `CONJUR_AUTHN_HTTP_ALLOWLIST` in the
28
- test environment so Conjur's new SSRF guard does not block the authn-oidc
29
- `provider-uri` fetch to the compose-local Keycloak server. (CNJR-13786)
30
- - Corrected `Conjur::API.new_from_gcp` / `authenticate_gcp` to target the
31
- serviceless `authn-gcp` endpoint (`/authn-gcp/{account}/authenticate`) instead
32
- of `authn-jwt`; the `service_id` argument was removed accordingly (CNJR-14213).
33
8
 
34
9
  ## [6.3.1] - 2026-07-16
35
10
 
@@ -49,6 +24,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
49
24
  - Added `Conjur::API#fetch_policy` for retrieving policy data from the server,
50
25
  as YAML or JSON, with optional tree depth and size limits.
51
26
 
27
+ ### Changed
28
+ - CI uses Conjur Enterprise 1.27.0+, which removed the `GET /public_keys` endpoint
29
+ (CNJR-11339). Dropped the Cucumber scenario that exercised that API; the client
30
+ method remains for open-source Conjur.
31
+ - Retrieve the Cucumber admin API key via `conjurctl` in `test.sh` instead of rake,
32
+ avoiding Rails boot output corrupting the key on current Conjur images.
33
+ - CI now tests against Ruby 3.3, 3.4, and 4.0. Dropped Ruby 3.2 (end of life)
34
+ and raised the minimum supported Ruby version accordingly.
35
+
52
36
  ## [6.2.0] - 2026-06-05
53
37
 
54
38
  ## [6.1.0] - 2025-12-10
data/Jenkinsfile CHANGED
@@ -30,23 +30,8 @@ pipeline {
30
30
  }
31
31
 
32
32
  triggers {
33
- // Declarative pipelines allow only one parameterizedCron trigger, so both
34
- // schedules live in a single multi-line string. The daily build also
35
- // exercises the cloud authenticators end-to-end; PR builds leave the
36
- // RUN_*_TESTS params false, so those stages are skipped there.
37
- parameterizedCron("""
38
- ${getDailyCronString("%RUN_AWS_TESTS=true;RUN_AZURE_TESTS=true;RUN_GCP_TESTS=true")}
39
- ${getWeeklyCronString("H(1-5)","%MODE=RELEASE")}
40
- """)
41
- }
42
-
43
- parameters {
44
- booleanParam(name: 'RUN_AWS_TESTS', defaultValue: false,
45
- description: 'Run the authn-iam integration test on an AWS executor agent')
46
- booleanParam(name: 'RUN_AZURE_TESTS', defaultValue: false,
47
- description: 'Run the authn-azure integration test on an Azure executor agent')
48
- booleanParam(name: 'RUN_GCP_TESTS', defaultValue: false,
49
- description: 'Run the authn-jwt/gcp integration test (token fetched on a GCP agent)')
33
+ cron(getDailyCronString())
34
+ parameterizedCron(getWeeklyCronString("H(1-5)","%MODE=RELEASE"))
50
35
  }
51
36
 
52
37
  stages {
@@ -76,17 +61,6 @@ pipeline {
76
61
  steps {
77
62
  script {
78
63
  infrapool = getInfraPoolAgent.connected(type: "ExecutorV2", quantity: 1, duration: 1)[0]
79
- // Provision dedicated cloud agents only when the matching cloud test
80
- // is requested. These are real Azure/GCP VMs whose managed identity /
81
- // service account the authenticators exercise against the live
82
- // metadata service. The AWS test reuses the standard ExecutorV2 agent
83
- // (which itself runs in AWS with an instance profile).
84
- if (params.RUN_AZURE_TESTS) {
85
- azureInfrapool = getInfraPoolAgent.connected(type: "AzureExecutorV2", quantity: 1, duration: 1)[0]
86
- }
87
- if (params.RUN_GCP_TESTS) {
88
- gcpInfrapool = getInfraPoolAgent.connected(type: "GcpExecutorV2", quantity: 1, duration: 1)[0]
89
- }
90
64
  }
91
65
  }
92
66
  }
@@ -151,12 +125,6 @@ pipeline {
151
125
  script {
152
126
  infrapool.agentSh "./test.sh"
153
127
  infrapool.agentStash name: 'reports4.0', includes: '**/reports/*.xml'
154
- // Stash coverage from the full suite now. The cloud stages below run
155
- // ./test.sh again on this agent, and jenkins_init wipes and regenerates
156
- // coverage/ from a single cloud feature (no rspec) — which would drop
157
- // the reported coverage well below the quality gate. Capturing it here
158
- // keeps the submitted coverage that of the complete unit+cucumber run.
159
- infrapool.agentStash name: 'coverage', includes: '**/coverage/**'
160
128
  }
161
129
  }
162
130
  post {
@@ -166,101 +134,16 @@ pipeline {
166
134
  }
167
135
  }
168
136
 
169
- stage('Run AWS IAM tests') {
170
- when { expression { params.RUN_AWS_TESTS } }
171
- environment {
172
- INFRAPOOL_RUN_AWS_TESTS = 'true'
173
- INFRAPOOL_RUBY_VERSION = '3.3'
174
- INFRAPOOL_REGISTRY_URL = "registry.tld"
175
- }
176
- steps {
177
- script {
178
- // authn-iam identifies the Conjur host by the AWS caller identity, so
179
- // the host id in the policy must be "<account-id>/<role-name>". Derive
180
- // those from the agent's own instance profile (as conjur-api-java does)
181
- // and pass them to the feature via env.
182
- def callerIdentityJson = infrapool.agentSh(script: 'aws sts get-caller-identity', returnStdout: true).trim()
183
- def awsAccountId = (callerIdentityJson =~ /"Account"\s*:\s*"([^"]+)"/)[0][1]
184
- def awsArn = (callerIdentityJson =~ /"Arn"\s*:\s*"([^"]+)"/)[0][1]
185
- def awsRoleName = awsArn.tokenize('/')[1] // arn:...:assumed-role/<role>/<session>
186
- infrapool.agentSh """
187
- export INFRAPOOL_AWS_ACCOUNT_ID='${awsAccountId}'
188
- export INFRAPOOL_AWS_ROLE_NAME='${awsRoleName}'
189
- ./test.sh
190
- """
191
- }
192
- }
193
- post {
194
- always {
195
- script { infrapool.agentStash name: 'reports-aws', includes: '**/reports/*.xml' }
196
- unstash 'reports-aws'
197
- }
198
- }
199
- }
200
-
201
- stage('Run Azure tests') {
202
- when { expression { params.RUN_AZURE_TESTS } }
203
- environment {
204
- INFRAPOOL_RUN_AZURE_TESTS = 'true'
205
- INFRAPOOL_RUBY_VERSION = '3.3'
206
- INFRAPOOL_REGISTRY_URL = "registry.tld"
207
- }
208
- steps {
209
- script {
210
- // summon injects AZURE_SUBSCRIPTION_ID / AZURE_RESOURCE_GROUP /
211
- // USER_ASSIGNED_IDENTITY_CLIENT_ID from the CI vault; the test hits
212
- // the real Azure IMDS on this Azure VM.
213
- azureInfrapool.agentSh "summon -e azure ./test.sh"
214
- }
215
- }
216
- post {
217
- always {
218
- script { azureInfrapool.agentStash name: 'reports-azure', includes: '**/reports/*.xml' }
219
- unstash 'reports-azure'
220
- }
221
- }
222
- }
223
-
224
- stage('Run GCP tests') {
225
- when { expression { params.RUN_GCP_TESTS } }
226
- environment {
227
- INFRAPOOL_RUN_GCP_TESTS = 'true'
228
- INFRAPOOL_RUBY_VERSION = '3.3'
229
- INFRAPOOL_REGISTRY_URL = "registry.tld"
230
- GCP_CTX_DIR = "gcp-ctx"
231
- }
232
- steps {
233
- script {
234
- // GCP agents lack a Docker runtime, so fetch a real identity token on
235
- // the GCP VM, stash it, then run the actual test on the AWS agent with
236
- // the token supplied via GCP_ID_TOKEN.
237
- gcpInfrapool.agentSh "./ci/get_gcp_token.sh data/test/gcp-apps/test-app cucumber ${GCP_CTX_DIR}"
238
- gcpInfrapool.agentStash name: 'gcp-token', includes: "${GCP_CTX_DIR}/*"
239
- infrapool.agentUnstash name: 'gcp-token'
240
- infrapool.agentSh """
241
- export GCP_ID_TOKEN="\$(cat ${GCP_CTX_DIR}/token)"
242
- export GCP_PROJECT_ID="\$(cat ${GCP_CTX_DIR}/project-id)"
243
- ./test.sh
244
- """
245
- }
246
- }
247
- post {
248
- always {
249
- script { infrapool.agentStash name: 'reports-gcp', includes: '**/reports/*.xml' }
250
- unstash 'reports-gcp'
251
- }
252
- }
253
- }
254
-
255
137
  stage('Submit Coverage Report'){
256
138
  steps{
257
- // Coverage was stashed at the end of 'Test Ruby 4.0', before the cloud
258
- // stages regenerated a partial coverage/ on the agent.
139
+ script {
140
+ infrapool.agentStash name: 'coverage', includes: '**/coverage/**'
141
+ }
259
142
  unstash 'coverage'
260
143
 
261
144
  recordCoverage(
262
145
  tools: [[parser: 'COBERTURA', pattern: 'coverage/coverage.xml']],
263
- sourceCodeEncoding: 'UTF-8',
146
+ sourceCodeEncoding: 'ASCII',
264
147
  qualityGates: [
265
148
  [threshold: 70.0, metric: 'LINE', baseline: 'PROJECT', unstable: true],
266
149
  [threshold: 70.0, metric: 'BRANCH', baseline: 'PROJECT', unstable: true],
data/Rakefile CHANGED
@@ -23,34 +23,8 @@ begin
23
23
  require 'cucumber'
24
24
  require 'cucumber/rake/task'
25
25
 
26
- # Cloud-authenticator features (authn-iam / authn-azure / authn-jwt gcp) are
27
- # live integration tests that only work on the matching cloud agent, so they
28
- # are excluded from the default suite and opted into via the CLOUD_AUTHN_TAG
29
- # env var by the dedicated jenkins_cucumber_cloud task.
30
- CLOUD_AUTHN_TAGS = %w[@authn_iam @authn_azure @authn_gcp].freeze
31
-
32
26
  Cucumber::Rake::Task.new(:cucumber) do |t|
33
- exclude = (['@wip'] + CLOUD_AUTHN_TAGS).map { |tag| "not #{tag}" }.join(' and ')
34
- t.cucumber_opts = "--tags '#{exclude}' --format pretty --format junit --out features/reports"
35
- end
36
-
37
- # Runs a single cloud-authenticator feature, selected by CLOUD_AUTHN_TAG
38
- # (e.g. CLOUD_AUTHN_TAG=@authn_iam). Used by the cloud CI stages.
39
- #
40
- # NOTE: this block runs at Rakefile load time, so it must not raise when
41
- # CLOUD_AUTHN_TAG is unset (that would break every other rake invocation).
42
- # The value is validated in the :validate_cloud_authn_tag prerequisite,
43
- # which only runs when this task is actually invoked. The fallback tag here
44
- # is only a placeholder for the load-time cucumber_opts string.
45
- Cucumber::Rake::Task.new(:cucumber_cloud) do |t|
46
- tag = ENV['CLOUD_AUTHN_TAG'].to_s.empty? ? '@authn_iam' : ENV['CLOUD_AUTHN_TAG']
47
- t.cucumber_opts = "--tags '#{tag}' --format pretty --format junit --out features/reports"
48
- end
49
-
50
- task :validate_cloud_authn_tag do
51
- if ENV['CLOUD_AUTHN_TAG'].to_s.empty?
52
- raise 'CLOUD_AUTHN_TAG must be set (e.g. @authn_iam) to run jenkins_cucumber_cloud'
53
- end
27
+ t.cucumber_opts = "--tags 'not @wip' --format pretty --format junit --out features/reports"
54
28
  end
55
29
 
56
30
  begin
@@ -59,7 +33,6 @@ begin
59
33
  task :jenkins_init => [ :init_coverage, :cuke_report_cleanup ]
60
34
  task :jenkins_spec => [ :"ci:setup:rspec", :spec ]
61
35
  task :jenkins_cucumber => [ :cucumber ]
62
- task :jenkins_cucumber_cloud => [ :validate_cloud_authn_tag, :cucumber_cloud ]
63
36
  rescue LoadError
64
37
  warn "ci_reporter_rspec not found, jenkins task will be unavailable"
65
38
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.3.1-848
1
+ 6.3.1
data/conjur-api.gemspec CHANGED
@@ -40,8 +40,4 @@ Gem::Specification.new do |gem|
40
40
  gem.add_development_dependency 'pry-byebug'
41
41
  gem.add_development_dependency 'nokogiri'
42
42
  gem.add_development_dependency 'webrick'
43
- # Optional runtime dependency for the IAM authenticator (authn-iam); not a
44
- # hard dependency of the gem, but required to exercise it in the integration
45
- # tests.
46
- gem.add_development_dependency 'aws-sdk-core'
47
43
  end
data/docker-compose.yml CHANGED
@@ -11,21 +11,6 @@ services:
11
11
  environment:
12
12
  DATABASE_URL: postgres://postgres@pg/postgres
13
13
  CONJUR_DATA_KEY: 'WMfApcDBtocRWV+ZSUP3Tjr5XNU+Z2FdBb6BEezejIs='
14
- # NOTE: CONJUR_AUTHENTICATORS is intentionally left unset. When unset the
15
- # server is permissive, so both the existing authn-oidc tests and the
16
- # cloud-authenticator features can enable their authenticators at runtime
17
- # via authenticator_enable. Setting an explicit allowlist here makes the
18
- # server strict and breaks the authn-oidc scenarios, and any authenticators
19
- # listed would show up in authenticator_list's "enabled" set (which the
20
- # authenticators.feature assertions depend on staying ["authn"]).
21
- #
22
- # Conjur's SSRF guard blocks authenticator fetches (authn-oidc provider-uri here) that
23
- # resolve to loopback/RFC1918 ranges or use plain HTTP. Keycloak is reached by compose
24
- # service name, so it resolves inside the bridge network's private subnet and its
25
- # discovery document advertises http://keycloak:8080 endpoints. Both guards must be
26
- # opted out of for this test env. Mirrors conjur's own ci/docker-compose.yml.
27
- CONJUR_AUTHN_ALLOWED_IP_RANGES: ${CONJUR_AUTHN_ALLOWED_IP_RANGES:-0.0.0.0/0,::/0}
28
- CONJUR_AUTHN_HTTP_ALLOWLIST: ${CONJUR_AUTHN_HTTP_ALLOWLIST:-keycloak}
29
14
  volumes:
30
15
  - authn_local:/run/authn-local
31
16
  - ./ci/oauth/keycloak:/scripts
@@ -42,33 +42,6 @@ module Conjur
42
42
  )[fully_escape account][fully_escape username]['authenticate']
43
43
  end
44
44
 
45
- # POST /authn-azure/{service_id}/{account}/{login}/authenticate
46
- def authn_azure_authenticate account, service_id, identity
47
- RestClient::Resource.new(
48
- Conjur.configuration.core_url,
49
- Conjur.configuration.rest_client_options
50
- )['authn-azure'][fully_escape service_id][fully_escape account][fully_escape identity]['authenticate']
51
- end
52
-
53
- # POST /authn-iam/{service_id}/{account}/{login}/authenticate
54
- def authn_iam_authenticate account, service_id, identity
55
- RestClient::Resource.new(
56
- Conjur.configuration.core_url,
57
- Conjur.configuration.rest_client_options
58
- )['authn-iam'][fully_escape service_id][fully_escape account][fully_escape identity]['authenticate']
59
- end
60
-
61
- # POST /authn-gcp/{account}/authenticate
62
- # authn-gcp is a serviceless authenticator: Conjur derives the host from
63
- # the GCP identity token's claims, so neither a service id nor the login
64
- # appears in the path.
65
- def authn_gcp_authenticate account
66
- RestClient::Resource.new(
67
- Conjur.configuration.core_url,
68
- Conjur.configuration.rest_client_options
69
- )['authn-gcp'][fully_escape account]['authenticate']
70
- end
71
-
72
45
  # Builds the RestClient::Resource for an authn-cert authentication request.
73
46
  # cert_options must include :ssl_client_cert and :ssl_client_key so that
74
47
  # the client certificate is presented during the TLS handshake.
@@ -89,14 +62,10 @@ module Conjur
89
62
  end
90
63
 
91
64
  def authenticator account, authenticator, service_id, credentials
92
- resource = RestClient::Resource.new(
65
+ RestClient::Resource.new(
93
66
  Conjur.configuration.core_url,
94
67
  Conjur.configuration.create_rest_client_options(credentials)
95
- )[fully_escape authenticator]
96
- # Serviceless authenticators (e.g. authn-gcp) have no service id segment:
97
- # the path is authn-<type>/<account>.
98
- resource = resource[fully_escape service_id] unless service_id.nil? || service_id.empty?
99
- resource[fully_escape account]
68
+ )[fully_escape authenticator][fully_escape service_id][fully_escape account]
100
69
  end
101
70
 
102
71
  def authenticators
data/lib/conjur/api.rb CHANGED
@@ -36,9 +36,6 @@ require 'conjur/log_source'
36
36
  require 'conjur/has_attributes'
37
37
  require 'conjur/api/authenticators'
38
38
  require 'conjur/api/authn'
39
- require 'conjur/api/authn_azure'
40
- require 'conjur/api/authn_iam'
41
- require 'conjur/api/authn_gcp'
42
39
  require 'conjur/api/authn_cert'
43
40
  require 'conjur/api/roles'
44
41
  require 'conjur/api/resources'
data/test.sh CHANGED
@@ -7,22 +7,6 @@ RUBY_VERSION="$(cut -d '-' -f 2 <<< "$RUBY_VERSION")"
7
7
  export REGISTRY_URL=${INFRAPOOL_REGISTRY_URL:-"docker.io"}
8
8
  export RUBY_VERSION="${INFRAPOOL_RUBY_VERSION:-$RUBY_VERSION}"
9
9
 
10
- # Cloud-authenticator integration toggles. These accept both plain and
11
- # INFRAPOOL_-prefixed variants (Jenkins injects the latter). When any is
12
- # "true", ONLY that authenticator's tagged feature runs against real cloud
13
- # infrastructure; the normal suite is skipped. Left unset by default so PR
14
- # builds run the ordinary unit + cucumber suite.
15
- RUN_AWS_TESTS="${INFRAPOOL_RUN_AWS_TESTS:-${RUN_AWS_TESTS:-false}}"
16
- RUN_AZURE_TESTS="${INFRAPOOL_RUN_AZURE_TESTS:-${RUN_AZURE_TESTS:-false}}"
17
- RUN_GCP_TESTS="${INFRAPOOL_RUN_GCP_TESTS:-${RUN_GCP_TESTS:-false}}"
18
- export RUN_AWS_TESTS RUN_AZURE_TESTS RUN_GCP_TESTS
19
-
20
- # authn-iam identifies the Conjur host by the AWS caller identity; the AWS stage
21
- # derives these from `aws sts get-caller-identity` on the agent.
22
- AWS_ACCOUNT_ID="${INFRAPOOL_AWS_ACCOUNT_ID:-${AWS_ACCOUNT_ID:-}}"
23
- AWS_ROLE_NAME="${INFRAPOOL_AWS_ROLE_NAME:-${AWS_ROLE_NAME:-}}"
24
- export AWS_ACCOUNT_ID AWS_ROLE_NAME
25
-
26
10
  source ./ci/oauth/keycloak/keycloak_functions.sh
27
11
  TOP_LEVEL=$(git rev-parse --show-toplevel)
28
12
 
@@ -39,23 +23,6 @@ if [ ! -f "${TOP_LEVEL}/VERSION" ]; then
39
23
  echo -n "0.0.dev" > "${TOP_LEVEL}/VERSION"
40
24
  fi
41
25
 
42
- # Returns the cloud-authn cucumber tag to run when a RUN_*_TESTS flag is set,
43
- # or empty for a normal run. Validates required env vars for the chosen cloud.
44
- function cloudAuthnTag() {
45
- if [[ "$RUN_AWS_TESTS" == "true" ]]; then
46
- : "${AWS_ACCOUNT_ID:?AWS_ACCOUNT_ID is required for IAM tests (derived from aws sts get-caller-identity)}"
47
- : "${AWS_ROLE_NAME:?AWS_ROLE_NAME is required for IAM tests (derived from aws sts get-caller-identity)}"
48
- echo '@authn_iam'
49
- elif [[ "$RUN_AZURE_TESTS" == "true" ]]; then
50
- : "${AZURE_SUBSCRIPTION_ID:?AZURE_SUBSCRIPTION_ID is required for Azure tests}"
51
- : "${AZURE_RESOURCE_GROUP:?AZURE_RESOURCE_GROUP is required for Azure tests}"
52
- echo '@authn_azure'
53
- elif [[ "$RUN_GCP_TESTS" == "true" ]]; then
54
- : "${GCP_ID_TOKEN:?GCP_ID_TOKEN is required for GCP tests (run ci/get_gcp_token.sh first)}"
55
- echo '@authn_gcp'
56
- fi
57
- }
58
-
59
26
  function main() {
60
27
  if ! docker info >/dev/null 2>&1; then
61
28
  echo "Docker does not seem to be running, run it first and retry"
@@ -64,8 +31,6 @@ function main() {
64
31
  # Generate reports folders locally
65
32
  mkdir -p spec/reports features/reports
66
33
 
67
- CLOUD_AUTHN_TAG="$(cloudAuthnTag)"
68
-
69
34
  startConjur
70
35
  runTests
71
36
  }
@@ -89,15 +54,6 @@ function runTests() {
89
54
 
90
55
  local api_key=$(docker compose exec -T conjur conjurctl role retrieve-key cucumber:user:admin | tr -d '\r\n')
91
56
 
92
- if [[ -n "$CLOUD_AUTHN_TAG" ]]; then
93
- runCloudAuthnTests "$api_key"
94
- else
95
- runDefaultTests "$api_key"
96
- fi
97
- }
98
-
99
- function runDefaultTests() {
100
- local api_key="$1"
101
57
  echo 'Running tests'
102
58
  echo '-----'
103
59
  docker compose run --rm \
@@ -107,38 +63,4 @@ function runDefaultTests() {
107
63
  "/scripts/fetch_certificate && bundle exec rake jenkins_init jenkins_spec jenkins_cucumber"
108
64
  }
109
65
 
110
- # Runs a single cloud-authenticator feature against real cloud infrastructure.
111
- # Forwards the cloud provider env vars and clears proxies so the container can
112
- # reach the link-local metadata endpoints (169.254.169.254, metadata.google.internal).
113
- function runCloudAuthnTests() {
114
- local api_key="$1"
115
- echo "Running cloud authenticator tests: $CLOUD_AUTHN_TAG"
116
- echo '-----'
117
- local rc=0
118
- docker compose run --rm \
119
- -e CONJUR_AUTHN_API_KEY="$api_key" \
120
- -e CLOUD_AUTHN_TAG="$CLOUD_AUTHN_TAG" \
121
- -e NO_PROXY="169.254.169.254,metadata.google.internal,localhost,127.0.0.1,conjur" \
122
- -e HTTP_PROXY="" -e HTTPS_PROXY="" -e http_proxy="" -e https_proxy="" \
123
- -e AZURE_SUBSCRIPTION_ID="${AZURE_SUBSCRIPTION_ID:-}" \
124
- -e AZURE_RESOURCE_GROUP="${AZURE_RESOURCE_GROUP:-}" \
125
- -e USER_ASSIGNED_IDENTITY_CLIENT_ID="${USER_ASSIGNED_IDENTITY_CLIENT_ID:-}" \
126
- -e GCP_ID_TOKEN="${GCP_ID_TOKEN:-}" \
127
- -e GCP_PROJECT_ID="${GCP_PROJECT_ID:-}" \
128
- -e AWS_ACCOUNT_ID="${AWS_ACCOUNT_ID:-}" \
129
- -e AWS_ROLE_NAME="${AWS_ROLE_NAME:-}" \
130
- tester \
131
- "bundle exec rake jenkins_init jenkins_cucumber_cloud" || rc=$?
132
-
133
- # On failure, dump the Conjur server log: authn-azure/iam/gcp rejections are
134
- # logged there with the precise reason (issuer/annotation/audience mismatch),
135
- # which the client only ever sees as an opaque 401.
136
- if [[ $rc -ne 0 ]]; then
137
- echo "=== cloud authn test failed; last 100 lines of Conjur server log ==="
138
- docker compose logs --tail=100 conjur || true
139
- echo '=== end Conjur server log ==='
140
- fi
141
- return $rc
142
- }
143
-
144
66
  main
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjur-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.3.1.pre.848
4
+ version: 6.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - CyberArk Maintainers
@@ -261,20 +261,6 @@ dependencies:
261
261
  - - ">="
262
262
  - !ruby/object:Gem::Version
263
263
  version: '0'
264
- - !ruby/object:Gem::Dependency
265
- name: aws-sdk-core
266
- requirement: !ruby/object:Gem::Requirement
267
- requirements:
268
- - - ">="
269
- - !ruby/object:Gem::Version
270
- version: '0'
271
- type: :development
272
- prerelease: false
273
- version_requirements: !ruby/object:Gem::Requirement
274
- requirements:
275
- - - ">="
276
- - !ruby/object:Gem::Version
277
- version: '0'
278
264
  description: Conjur API
279
265
  email:
280
266
  - conj_maintainers@cyberark.com
@@ -305,7 +291,6 @@ files:
305
291
  - SECURITY.md
306
292
  - VERSION
307
293
  - ci/configure.sh
308
- - ci/get_gcp_token.sh
309
294
  - ci/oauth/keycloak/create_client
310
295
  - ci/oauth/keycloak/create_user
311
296
  - ci/oauth/keycloak/fetch_certificate
@@ -320,12 +305,8 @@ files:
320
305
  - dev/stop
321
306
  - docker-compose.yml
322
307
  - example/demo.rb
323
- - features/README.md
324
308
  - features/authenticators.feature
325
309
  - features/authn.feature
326
- - features/authn_azure.feature
327
- - features/authn_gcp.feature
328
- - features/authn_iam.feature
329
310
  - features/authn_local.feature
330
311
  - features/exists.feature
331
312
  - features/group.feature
@@ -341,7 +322,6 @@ files:
341
322
  - features/role_fields.feature
342
323
  - features/rotate_api_key.feature
343
324
  - features/step_definitions/api_steps.rb
344
- - features/step_definitions/cloud_authn_steps.rb
345
325
  - features/step_definitions/policy_steps.rb
346
326
  - features/step_definitions/result_steps.rb
347
327
  - features/support/env.rb
@@ -362,10 +342,7 @@ files:
362
342
  - lib/conjur/api.rb
363
343
  - lib/conjur/api/authenticators.rb
364
344
  - lib/conjur/api/authn.rb
365
- - lib/conjur/api/authn_azure.rb
366
345
  - lib/conjur/api/authn_cert.rb
367
- - lib/conjur/api/authn_gcp.rb
368
- - lib/conjur/api/authn_iam.rb
369
346
  - lib/conjur/api/host_factories.rb
370
347
  - lib/conjur/api/ldap_sync.rb
371
348
  - lib/conjur/api/policies.rb
@@ -408,7 +385,6 @@ files:
408
385
  - lib/conjur/variable.rb
409
386
  - lib/conjur/webservice.rb
410
387
  - publish.sh
411
- - secrets.yml
412
388
  - spec/.conjurrc
413
389
  - spec/api/host_factories_spec.rb
414
390
  - spec/api/policies_spec.rb
@@ -416,10 +392,7 @@ files:
416
392
  - spec/api/server_version_spec.rb
417
393
  - spec/api/version_check_spec.rb
418
394
  - spec/api_spec.rb
419
- - spec/authn_azure_spec.rb
420
395
  - spec/authn_cert_spec.rb
421
- - spec/authn_gcp_spec.rb
422
- - spec/authn_iam_spec.rb
423
396
  - spec/base_object_spec.rb
424
397
  - spec/cert_utils_spec.rb
425
398
  - spec/cidr_spec.rb
@@ -464,12 +437,8 @@ rubygems_version: 4.0.10
464
437
  specification_version: 4
465
438
  summary: Conjur API
466
439
  test_files:
467
- - features/README.md
468
440
  - features/authenticators.feature
469
441
  - features/authn.feature
470
- - features/authn_azure.feature
471
- - features/authn_gcp.feature
472
- - features/authn_iam.feature
473
442
  - features/authn_local.feature
474
443
  - features/exists.feature
475
444
  - features/group.feature
@@ -485,7 +454,6 @@ test_files:
485
454
  - features/role_fields.feature
486
455
  - features/rotate_api_key.feature
487
456
  - features/step_definitions/api_steps.rb
488
- - features/step_definitions/cloud_authn_steps.rb
489
457
  - features/step_definitions/policy_steps.rb
490
458
  - features/step_definitions/result_steps.rb
491
459
  - features/support/env.rb
@@ -503,10 +471,7 @@ test_files:
503
471
  - spec/api/server_version_spec.rb
504
472
  - spec/api/version_check_spec.rb
505
473
  - spec/api_spec.rb
506
- - spec/authn_azure_spec.rb
507
474
  - spec/authn_cert_spec.rb
508
- - spec/authn_gcp_spec.rb
509
- - spec/authn_iam_spec.rb
510
475
  - spec/base_object_spec.rb
511
476
  - spec/cert_utils_spec.rb
512
477
  - spec/cidr_spec.rb
data/ci/get_gcp_token.sh DELETED
@@ -1,43 +0,0 @@
1
- #!/bin/bash -e
2
- #
3
- # Fetch a GCP identity token from the instance metadata service.
4
- #
5
- # This is meant to run ON a GCP executor agent. GCP agents typically lack a
6
- # Docker runtime, so the authn-jwt/gcp integration test itself runs on a
7
- # different (e.g. AWS) agent. This script fetches a real identity token here,
8
- # writes it to a file, and the Jenkins pipeline stashes it and hands it to the
9
- # test container via the GCP_ID_TOKEN env var.
10
- #
11
- # Usage: ./ci/get_gcp_token.sh <host-id> <account> <output-dir>
12
- # host-id Conjur host id WITHOUT the "host/" prefix
13
- # (e.g. "data/test/gcp-apps/test-app")
14
- # account Conjur account (e.g. "cucumber")
15
- # output-dir directory to write "token" and "project-id" into
16
-
17
- HOST_ID="${1:?host-id (without host/ prefix) is required}"
18
- ACCOUNT="${2:?account is required}"
19
- OUT_DIR="${3:?output directory is required}"
20
-
21
- METADATA_BASE="http://metadata.google.internal/computeMetadata/v1"
22
- AUDIENCE="conjur/${ACCOUNT}/host/${HOST_ID}"
23
-
24
- mkdir -p "${OUT_DIR}"
25
-
26
- echo "Fetching GCP identity token for audience: ${AUDIENCE}"
27
- token="$(curl -sS --noproxy '*' -H 'Metadata-Flavor: Google' \
28
- "${METADATA_BASE}/instance/service-accounts/default/identity?audience=${AUDIENCE}&format=full")"
29
-
30
- # Sanity-check that we got a 3-part JWT rather than an HTML error page.
31
- if [[ "$(grep -o '\.' <<< "${token}" | wc -l | tr -d ' ')" != "2" ]]; then
32
- echo "ERROR: metadata service did not return a JWT. Got:" >&2
33
- echo "${token}" >&2
34
- exit 1
35
- fi
36
-
37
- project_id="$(curl -sS --noproxy '*' -H 'Metadata-Flavor: Google' \
38
- "${METADATA_BASE}/project/project-id")"
39
-
40
- printf '%s' "${token}" > "${OUT_DIR}/token"
41
- printf '%s' "${project_id}" > "${OUT_DIR}/project-id"
42
-
43
- echo "Wrote ${OUT_DIR}/token and ${OUT_DIR}/project-id"