Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authn jwt refactor v5 #2990

Draft
wants to merge 112 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
5fcbf0e
Authn-JWT refactor
jvanderhoof May 26, 2023
d035e93
Interface updates to Authn-OIDC code redirect authentication flow
jvanderhoof May 26, 2023
f6f35d8
Removes previous authn-jwt code
jvanderhoof May 26, 2023
a4354c0
Update test env to use postgres 15
telday Apr 18, 2023
0e7b00d
Change from docker-compose to docker compose in scripts
Jun 15, 2023
50cbd20
Fix changelog for 1.19.5 release
gl-johnson Jun 26, 2023
7e20e26
Moved stash operation after tests to post statement
hdabrowski Jun 27, 2023
9dd839b
Support extracting STS host region from authorization header
gl-johnson Jun 20, 2023
c11bd8b
Separate call and retry logic
gl-johnson Jul 6, 2023
cceea17
Update CONJ00013E error message to apply to AuthnOIDC V1 and V2
john-odonnell Jun 29, 2023
6fa60ad
Parallel cukes: support socket connections to parallel Conjur services
john-odonnell Jul 11, 2023
a49e921
Dev env fixes
john-odonnell Jul 11, 2023
f690530
Apply a check to run different compose versions
Jul 12, 2023
6e3dfa6
Remove httpclient private certs
andytinkham Jul 21, 2023
42daab3
Upgrade rails and webrick to latest versions
andytinkham Jul 26, 2023
8ee6564
Add trivyignore for CONJSE-1795
codihuston Jul 27, 2023
4776e0f
Add Prometheus scrape target (/metrics) and client store
gl-johnson Mar 2, 2022
4d62818
Add injectable lib for Pub/Sub mechanics
john-odonnell Mar 8, 2022
fa1a45c
Reorganize RSpec tests for Monitoring library and update requirements
john-odonnell Mar 22, 2022
42e6c4b
Clean up spec/lib/monitoring imports
doodlesbykumbi Mar 23, 2022
8aa5f9c
Load telemetry_enabled value in ConjurConfig, add Prometheus initializer
gl-johnson Apr 12, 2022
3fcdc82
Cleanup exporter tests
gl-johnson Apr 12, 2022
562aefb
Add HTTP request collector middleware and metrics helper
gl-johnson Apr 29, 2022
b22797d
Define request metrics, operations, and tests
gl-johnson Apr 29, 2022
e99f782
Update Prometheus initializer and cleanup
gl-johnson Apr 29, 2022
95cdde3
Add policy resource metric and pub/sub events
gl-johnson May 25, 2022
3ce082b
Add stubs for future throttling of metric updates
gl-johnson May 25, 2022
5d31202
Policy metric tests
gl-johnson May 25, 2022
2fa3d93
Add policy role metric and tests
gl-johnson May 26, 2022
d377685
Add authenticator metric and tests
gl-johnson Sep 14, 2022
09f11ec
Add prometheus service and config to dev/start script
gl-johnson Sep 28, 2022
74efeac
Add telemetry docs
gl-johnson Oct 3, 2022
e748867
Lazy setup of metrics, remove unused throttling code/tests
gl-johnson Oct 17, 2022
60f54e8
Log monitoring exceptions
szh Jul 18, 2023
f4af817
Use custom error
szh Jul 18, 2023
fb3eacb
Use dependency injection for installed authenticators
szh Jul 18, 2023
169eee0
Add telemetry entry to CHANGELOG.md
doodlesbykumbi Jul 26, 2023
77b0b1d
Add/refactor some unit tests
gl-johnson Jul 25, 2023
da8cda6
Temporarily enable all tests on all branch builds
imheresamir Aug 8, 2023
f6fe279
Add flag to conjurctl server to skip migrations
telday Jul 27, 2023
1d69ea4
Support plural syntax for revoke and deny
egvili Aug 9, 2023
783bb98
Update cucumber RestHelpers to support parallel tests
micahlee Aug 9, 2023
c9288a2
Cleanup: Consolidate existing sequel config into initializer
micahlee Jul 28, 2023
78a6f08
Cleanup: Fix issues in the changelog
micahlee Jul 28, 2023
ed839eb
Improve input validation and error messages
micahlee Aug 9, 2023
f6773a6
Use Conjur application settings in the appliance
micahlee Aug 9, 2023
91f1214
Set the db connection pool size based on the worker thread count
micahlee Aug 15, 2023
bb615d4
Initial implementation of Policy Factories
jvanderhoof Jul 14, 2023
aa7c374
Initial set of Factory templates
jvanderhoof Jul 14, 2023
a3f48fd
Fix CONJSE-1785
egvili Aug 13, 2023
745a311
Cleanup: Fix changelog issues
micahlee Aug 16, 2023
fccfa80
Upgrade OpenIDConnect dependency to fix environment proxy support
gl-johnson Aug 17, 2023
9c81bb2
Allows Policy Factories with variables to be set in the root policy
jvanderhoof Aug 17, 2023
98bc621
Cukes: use CONJUR_APPLIANCE_URL before http://conjur
john-odonnell Jul 28, 2023
ba18103
Capture current behavior of policy load to create/update annot
john-odonnell Jul 31, 2023
3f2e9e2
Tag new Cucumber tests
john-odonnell Aug 14, 2023
4d8cbd0
Fail additive policy load requests that update existing resources
john-odonnell Aug 17, 2023
aa17be4
Create and use unique DisallowedPolicyOperation exception
john-odonnell Aug 18, 2023
1fb0429
Remove oidc_connect gem test private key
andytinkham Aug 24, 2023
727c828
Authn-JWT refactor
jvanderhoof May 26, 2023
bef4fde
Refactor authenticator pattern to remove identity mapping
jvanderhoof Aug 31, 2023
bfb1688
Small additional changes to refactor
jvanderhoof Oct 13, 2023
551511b
Initial implementation of Policy Factories
jvanderhoof Jul 14, 2023
da4b572
Update puma to version 6
Aug 28, 2023
8dc5ac5
Update smaller gem files
Aug 28, 2023
739118d
Update jwt gem
Aug 29, 2023
32f0cc1
Fix changelog links
szh Aug 30, 2023
fefb8e0
DevEnv: Set COMPOSE envvar before sourcing keycloak_functions.sh
john-odonnell Aug 24, 2023
4288578
AuthnOIDC: optionally write temp certs before provider discovery
john-odonnell Aug 24, 2023
528397c
AuthnOIDC: optionally write temp certs before Authz Code callback
john-odonnell Aug 24, 2023
242f578
Review updates: use CertUtils, handle hash collisions
john-odonnell Aug 28, 2023
69d7d3e
Add optional 'ca-cert' config to authn-oidc
gl-johnson Aug 29, 2023
f43a947
Review feedback and codeclimate adjustments
gl-johnson Aug 31, 2023
148cfda
Fix linting issues
Aug 29, 2023
2efc342
Switch to base image new tagging; Add multistage image building
hdabrowski Aug 30, 2023
5d57f15
Add updated dependencies
Aug 31, 2023
208ddd3
Revert "Create and use unique DisallowedPolicyOperation exception"
john-odonnell Sep 5, 2023
2c5727d
Revert "Fail additive policy load reqs that update existing resources"
john-odonnell Sep 5, 2023
cace588
Wrap discovery and callback calls
gl-johnson Aug 31, 2023
174880c
Update cukes and wrap jwks call
gl-johnson Sep 5, 2023
a96fb7b
use deployment mode while bundling
tarnowsc Sep 7, 2023
d078a40
use bundler setup in conjurctl
tarnowsc Sep 7, 2023
ae885e0
Allows Policy Factory to detect the correct port
jvanderhoof Sep 5, 2023
c0120ff
Use new FIPS base images
tarnowsc Jun 20, 2023
c37b235
Display fips mode status in the UI, temporary fix for openssl gem
tarnowsc Jul 14, 2023
fa597fa
Update documentation
rjurekca Aug 2, 2023
2fb80a0
Update Authn-JWT test for openssl updates
micahlee Aug 17, 2023
ca8b22d
Fix codeclimate issue
tarnowsc Aug 22, 2023
863949b
!tmp: pin appliance version
tarnowsc Sep 11, 2023
e9c104b
Revert "!tmp: pin appliance version"
marek-jakubowski Sep 11, 2023
12bb5b0
clean .trivyignore from issues that are no longer applicable for conjur
tarnowsc Sep 12, 2023
f9eacd0
fix unwanted certs removal
tarnowsc Sep 15, 2023
ad667e5
Allows optional values to optionally be present
jvanderhoof Sep 19, 2023
2be4710
Update syntax to remove deprecated behavior
jvanderhoof Sep 19, 2023
bdaa9a4
Stop Syslog-NG with a Down file
jvanderhoof Sep 19, 2023
8ab23c9
Adds better logging to enable troubleshooting policy factory loading
jvanderhoof Sep 21, 2023
cdd2422
Update notices.txt and API_VERSION
gl-johnson Sep 21, 2023
a4ac4a0
Avoid flattening conjur-ubi image
gl-johnson Sep 21, 2023
adbcb60
Bump google/cloud-sdk to 448.0.0 in tests
andytinkham Sep 28, 2023
dd466c2
Install build tools in policy-parser test dockerfile
hughsaunders Oct 6, 2023
1cf80ac
K8s authenticator now supports no_proxy env var
telday Oct 4, 2023
2b87c5f
Force no_proxy in non-proxy authn_k8s cucumber tests
Oct 11, 2023
e5d76dc
AuthnOIDC V2: write custom certs to non-default directory
john-odonnell Oct 11, 2023
1dbf3b2
Fix OpenSSL X509 hash commands
john-odonnell Oct 13, 2023
d6bbabc
Cukes: remove Keycloak cert from Conjur container
john-odonnell Oct 13, 2023
662b297
Fix CHANGELOG entries for 1.20.1
john-odonnell Oct 13, 2023
96bddd0
Authn-JWT refactor
jvanderhoof May 26, 2023
433de10
Interface updates to Authn-OIDC code redirect authentication flow
jvanderhoof May 26, 2023
c458c75
Removes previous authn-jwt code
jvanderhoof May 26, 2023
7fdf97e
Initial implementation of Policy Factories
jvanderhoof Jul 14, 2023
db53dc8
Authn-JWT refactor
jvanderhoof May 26, 2023
0be2668
WIP related to authenticator refactor
jvanderhoof Oct 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ cucumber

*.deb
.git
.idea
engines/conjur_audit/spec/dummy/log
coverage
demo
Expand Down
93 changes: 0 additions & 93 deletions .trivyignore
Original file line number Diff line number Diff line change
@@ -1,93 +0,0 @@
# OpenSSL CVEs
#
# Because of the way OpenSSL 1.0.2 has moved to premium support and our Ubuntu
# base image, trivy flags a number of OpenSSL issues in Conjur because the fix
# for most Ubuntu users is to move to 1.1.1 instead of having the continued support
# in the 1.0.2 line. Additionally, trivy flages 1.0.2zf as vulnerable to issues that
# only affect 1.1.x. As of the time of this writing, we use 1.0.2zf which either
# has the fix or is unaffected by these issues.
CVE-2022-2097
CVE-2022-2068
CVE-2022-1292
CVE-2022-0778
CVE-2021-23841
CVE-2021-23840
CVE-2021-3712
CVE-2019-1563
CVE-2019-1551
CVE-2019-1549
CVE-2019-1547
CVE-2018-0735
CVE-2018-0734

# NULL pointer deref. OpenSSL 1.0.2 is not impacted
CVE-2021-3449

# We already use a later version than the ones listed as impacted by this
# CVE, so we believe this is just a scanner issue.
CVE-2014-7819

# Rake vulnerability for versions < 12.3.3. The version of Rake used by Conjur
# has been updated to 13.0.1. Some of the Conjur dependencies still declare a
# vulnerable version of Rake in their development dependencies, but do not pose
# a risk to Conjur.
CVE-2020-8130

# Applications that call the SSL_check_chain() function during or after a TLS 1.3 handshake
# may crash due to a NULL pointer dereference as a result of incorrect handling of the "signature_algorithms_cert"
# TLS extension. this issue was fixed in OpenSSL 1.1.1g
#
# In order to support fips with openssl we are required to downgrading openssl version to 1.0.2 until openssl will
# support fips module in newer versions
# This vulnerability this is not relevant to us as
# 1. The installed version (1.0.2u) does not support 1.3
# 2. Trivy detect the usage of openssl 1.0.2 (can be reproduced with
# docker run -v /var/run/docker.sock:/var/run/docker.sock
# -v $(PWD):/workspace --rm aquasec/trivy -f json -o /workspace/scan_results-conjur-unfixed.json --no-progress
# --ignorefile .trivyignore registry.tld/ruby-fips-base-image-phusion:1.0.0)
#
# Performed by @yahalomk approved by @shaharglazner
CVE-2020-1967

# CVE-2020-1971
# The X.509 GeneralName type is a generic type for representing different types
# of names. One of those name types is known as EDIPartyName. OpenSSL provides a
# function GENERAL_NAME_cmp which compares different instances of a GENERAL_NAME
# to see if they are equal or not. This function behaves incorrectly when both
# GENERAL_NAMEs contain an EDIPARTYNAME. A NULL pointer dereference and a crash
# may occur leading to a possible denial of service attack.
# OpenSSL itself uses the GENERAL_NAME_cmp function for two purposes:
#
# 1) Comparing CRL distribution point names between an available CRL and a CRL
# distribution point embedded in an X509 certificate.
#
# 2) When verifying that a timestamp response token signer matches the timestamp
# authority name (exposed via the API functions TS_RESP_verify_response and
# TS_RESP_verify_token) If an attacker can control both items being compared
# then that attacker could trigger a crash.
#
# All OpenSSL 1.1.1 and 1.0.2 versions are affected by this issue. Fixed in OpenSSL
# 1.1.1i (Affected 1.1.1-1.1.1h). Fixed in OpenSSL 1.0.2x (Affected 1.0.2-1.0.2w).
#
# In order to support FIPS with OpenSSL we are required to use OpenSSL version
# 1.0.2 until OpenSSL supports the FIPS module in newer versions. The latest
# available version to us is 1.0.2u, which does not include this fix.
#
# We've determined that we are not impacted by this vulnerability because:
# - we do not directly perform CRL checks in the Conjur or DAP software
# - we do not enable automatic CRL checks in openssl tools
# - we do not call any of the impacted OpenSSL APIs or any of the APIs that expose
# impacted behavior.
#
# Performed by @micahlee, approved by @andytinkham
CVE-2020-1971

# CVE-2021-3711
# The vulnerability is not affected Conjur's version of OpenSSL 1.0.2u (https://www.openssl.org/news/secadv/20210824.txt)
# Conjur does not use SM2 algorithm (https://www.openssl.org/docs/manmaster/man7/SM2.html)
CVE-2021-3711

# We have the fix for CVE-2023-0286 in openssl 1.0.2zg, but because OpenSSL 1.0.2
# is only available in premium support, trivy thinks we should use something in the 1.1.1
# line. We can't, due to FIPS compliance, so need to continue to ignore this issue.
CVE-2023-0286
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.0
5.3.1
83 changes: 79 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,82 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Nothing should go in this section, please add to the latest unreleased version
(and update the corresponding date), or add a new version.

## [1.19.5] - 2023-05-16
## [1.20.1] - 2023-10-13

### Fixed
- OIDC Authenticator now writes custom certs to a non-default directory instead
of the system default certificate store.
[cyberark/conjur#2988](https://github.com/cyberark/conjur/pull/2988)

### Added
- Support for the no_proxy & NO_PROXY environment variables for the k8s authenticator.
[CNJR-2759](https://ca-il-jira.il.cyber-ark.com:8443/browse/CNJR-2759)

### Security
- Upgrade google/cloud-sdk in ci/test_suites/authenticators_k8s/dev/Dockerfile/test
to use latest version (448.0.0)
[cyberark/conjur#2972](https://github.com/cyberark/conjur/pull/2972)

## [1.20.0] - 2023-09-21

### Fixed
- Allow Factories with optional variables to save without error
[cyberark/conjur#2956](https://github.com/cyberark/conjur/pull/2956)
- OIDC authenticators support `https_proxy` and `HTTPS_PROXY` environment variables
[cyberark/conjur#2902](https://github.com/cyberark/conjur/pull/2902)
- Support plural syntax for revoke and deny
[cyberark/conjur#2901](https://github.com/cyberark/conjur/pull/2901)

### Added
- Telemetry support
[cyberark/conjur#2854](https://github.com/cyberark/conjur/pull/2854)
- Introduces support for Policy Factory, which enables resource creation
through a new `factories` API.
[cyberark/conjur#2855](https://github.com/cyberark/conjur/pull/2855/files)

## [1.19.6] - 2023-07-05

### Added
- Support an optional`ca-cert` variable for providing custom certs/chains to verify
OIDC providers or proxies when using the OIDC authenticator
[cyberark/conjur#2933](https://github.com/cyberark/conjur/pull/2933)
- New flag to `conjurctl server` command called `--no-migrate` which allows for skipping
the database migration step when starting the server.
[cyberark/conjur#2895](https://github.com/cyberark/conjur/pull/2895)
- Telemetry support
[cyberark/conjur#2854](https://github.com/cyberark/conjur/pull/2854)
- Introduces support for Policy Factory, which enables resource creation
through a new `factories` API.
[cyberark/conjur#2855](https://github.com/cyberark/conjur/pull/2855/files)
- Use base images with newer Ubuntu and UBI.
Display FIPS Mode status in the UI (requires temporary fix for OpenSSL gem).
[cyberark/conjur#2874](https://github.com/cyberark/conjur/pull/2874)

### Changed
- The database thread pool max connection size is now based on the number of
web worker threads per process, rather than an arbitrary fixed number. This
mitigates the possibility of a web worker becoming starved while waiting for
a connection to become available.
[cyberark/conjur#2875](https://github.com/cyberark/conjur/pull/2875)
- Changed base-image tagging strategy
[cyberark/conjur#2926](https://github.com/cyberark/conjur/pull/2926)

### Fixed
- Support Authn-IAM regional requests when host value is missing from signed headers.
[cyberark/conjur#2827](https://github.com/cyberark/conjur/pull/2827)

### Security
- Support plural syntax for revoke and deny
[cyberark/conjur#2901](https://github.com/cyberark/conjur/pull/2901)
- Previously, attempting to add and remove a privilege in the same policy load
resulted in only the positive privilege (grant, permit) taking effect. Now we
fail safe and the negative privilege statement (revoke, deny) is the final
outcome
[cyberark/conjur#2907](https://github.com/cyberark/conjur/pull/2907)
- Update puma to 6.3.1 to address CVE-2023-40175.
[cyberark/conjur#2925](https://github.com/cyberark/conjur/pull/2925)

## [1.19.5] - 2023-06-29

### Security
- Update bundler to 2.2.33 to remove CVE-2021-43809
Expand All @@ -21,8 +96,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Authn-IAM now uses the host in the signed headers to determine which STS endpoint
(global or regional) to use for validation.

## [1.19.4] - 2023-05-12

### Changed
- OIDC tokens will now have a default ttl of 60 mins
[cyberark/conjur#2800](https://github.com/cyberark/conjur/pull/2800)
Expand Down Expand Up @@ -1045,7 +1118,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- The first tagged version.

[Unreleased]: https://github.com/cyberark/conjur/compare/v1.19.3...HEAD
[Unreleased]: https://github.com/cyberark/conjur/compare/v1.20.0...HEAD
[1.20.0]: https://github.com/cyberark/conjur/compare/v1.19.5...v1.20.0
[1.19.5]: https://github.com/cyberark/conjur/compare/v1.19.3...v1.19.5
[1.19.3]: https://github.com/cyberark/conjur/compare/v1.19.2...v1.19.3
[1.19.2]: https://github.com/cyberark/conjur/compare/v1.19.1...v1.19.2
[1.19.1]: https://github.com/cyberark/conjur/compare/v1.19.0...v1.19.1
Expand Down
58 changes: 28 additions & 30 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
FROM cyberark/ubuntu-ruby-fips:latest
FROM cyberark/ubuntu-ruby-builder:latest as builder

ENV CONJUR_HOME=/opt/conjur-server

WORKDIR ${CONJUR_HOME}

ENV DEBIAN_FRONTEND=noninteractive \
PORT=80 \
LOG_DIR=/opt/conjur-server/log \
TMP_DIR=/opt/conjur-server/tmp \
SSL_CERT_DIRECTORY=/opt/conjur/etc/ssl
COPY Gemfile Gemfile.lock ./
COPY ./gems/ ./gems/

EXPOSE 80
RUN bundle config set --local without 'test development' && \
bundle config set --local deployment true && \
bundle config set --local path vendor/bundle && \
bundle config --local jobs "$(nproc --all)" && \
bundle install && \
# Remove private keys brought in by gems in their test data
find / -name 'openid_connect-*' -type d -exec find {} -name '*.pem' -type f -delete \; && \
find / -name 'httpclient-*' -type d -exec find {} -name '*.key' -type f -delete \; && \
find / -name 'httpclient-*' -type d -exec find {} -name '*.pem' -type f -delete \;

FROM cyberark/ubuntu-ruby-fips:latest

RUN apt-get update -y && \
apt-get -y dist-upgrade && \
apt-get install -y libz-dev
ENV PORT=80 \
LOG_DIR=${CONJUR_HOME}/log \
TMP_DIR=${CONJUR_HOME}/tmp \
SSL_CERT_DIRECTORY=/opt/conjur/etc/ssl \
RAILS_ENV=production \
CONJUR_HOME=/opt/conjur-server

RUN apt-get install -y build-essential \
curl \
git \
ldap-utils \
tzdata \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="${PATH}:${CONJUR_HOME}/bin"

WORKDIR /opt/conjur-server
WORKDIR ${CONJUR_HOME}

# Ensure few required GID0-owned folders to run as a random UID (OpenShift requirement)
RUN mkdir -p $TMP_DIR \
Expand All @@ -28,20 +37,9 @@ RUN mkdir -p $TMP_DIR \
$SSL_CERT_DIRECTORY/cert \
/run/authn-local

COPY Gemfile \
Gemfile.lock ./
COPY gems/ gems/


RUN bundle --without test development

COPY . .
COPY --from=builder ${CONJUR_HOME} ${CONJUR_HOME}

# removing CA bundle of httpclient gem
RUN find / -name httpclient -type d -exec find {} -name *.pem -type f -delete \;

RUN ln -sf /opt/conjur-server/bin/conjurctl /usr/local/bin/

ENV RAILS_ENV production
EXPOSE ${PORT}

ENTRYPOINT [ "conjurctl" ]
5 changes: 2 additions & 3 deletions Dockerfile.fpm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ RUN apt-get update -y && \
apt-get install -y zlib1g-dev \
liblzma-dev

ENV BUNDLER_VERSION 2.2.33
RUN gem install --no-document bundler:$BUNDLER_VERSION fpm
RUN gem install --no-document fpm

RUN mkdir -p /src/opt/conjur/project

Expand All @@ -19,7 +18,7 @@ COPY gems/ gems/
COPY . .

# removing CA bundle of httpclient gem
RUN find / -name httpclient -type d -exec find {} -name *.pem -type f -delete \;
RUN find / -name httpclient -type d -exec find {} -name "*.pem" -type f -delete \;

ADD debify.sh /

Expand Down
32 changes: 31 additions & 1 deletion Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
ARG VERSION=latest

FROM cyberark/ubuntu-ruby-builder:latest as builder

ENV CONJUR_HOME=/opt/conjur-server \
GEM_HOME=/usr/local/bundle

WORKDIR ${CONJUR_HOME}

COPY Gemfile Gemfile.lock ./
COPY ./gems/ ./gems/

RUN bundle config unset --local without && \
bundle config unset --local path && \
bundle config set --local deployment false && \
bundle config --local jobs "$(nproc --all)" && \
bundle install && \
# removing CA bundle of httpclient gem
find / -name 'httpclient-*' -type d -exec find {} -name '*.pem' -type f -delete \; && \
find / -name 'httpclient-*' -type d -exec find {} -name '*.key' -type f -delete \; && \
# remove the private key in the oidc_connect gem spec directory
find / -name openid_connect -type d -exec find {} -name '*.pem' -type f -delete \;

FROM conjur:${VERSION}

RUN bundle --no-deployment --without ''
ENV GEM_HOME=/usr/local/bundle
ENV PATH="${GEM_HOME}/bin:${PATH}"

RUN bundle config unset --local without && \
bundle config unset --local path && \
bundle config set --local deployment false && \
gem install rake

COPY --from=builder ${GEM_HOME} ${GEM_HOME}
Loading