Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
762593a
KNOX-3310: Fix redundant ALIAS_PASSPHRASE assignment and improve logg…
smolnar82 Apr 28, 2026
4f94d95
KNOX-3311: Fix X509CertificateUtil.fetchPublicCertsFromServer issue w…
hanicz Apr 29, 2026
37fbbde
KNOX-3314: Ensure secure length for encryptQueryString generated by d…
hanicz May 5, 2026
df17516
KNOX-3315: Adds BCFKS as an option cert export (#1221)
hanicz May 6, 2026
fb70788
KNOX-3312 - Client Credentials Flow with HTTP Basic needs Unwrapped S…
lmccay May 6, 2026
7b5e518
KNOX-3317: Fixed NPE when no token-metadata-headers are declared for …
smolnar82 May 8, 2026
f546084
KNOX-3321 - KnoxToken Support for RFC 8693 Token Exchange act Claim (…
lmccay May 13, 2026
96cd8f6
KNOX-3319 : Ranger REST API not fully implemented in cdp-proxy-api (D…
moresandeep May 14, 2026
84f550c
KnoxIDF - Initial commit
smolnar82 Apr 16, 2026
540dfe1
KnoxIDF - multi OP support
smolnar82 Apr 21, 2026
790c808
KnoxIDF - make token endpoint configurable during discovery
smolnar82 Apr 22, 2026
353144d
KnoxIDF - Code cleanup and bug fixes
smolnar82 Apr 23, 2026
8efe393
KnoxIDF - Multi OP enablement improvements and code adoption to Larry…
smolnar82 Apr 27, 2026
56027d1
KnoxIDF - code cleanup, round 2
smolnar82 Apr 27, 2026
6c2b12d
Removed unused imports
smolnar82 Apr 28, 2026
af3d55e
KnoxIDF - Add REFRESH_TOKEN support
smolnar82 May 5, 2026
b6c9609
KnoxIDF - Automatically enable JdbcFederatedIdentityService when Knox…
smolnar82 May 5, 2026
5a90627
KnoxIDF - Added Docker-based integration tests
smolnar82 May 6, 2026
f6ac966
KnoxIDF - Fix Docker-based test results publishing
smolnar82 May 6, 2026
c1b243a
KnoxIDF - Fix Docker-based test results publishing; round 2
smolnar82 May 6, 2026
cfdb016
KnoxIDF: configurable user params provider (only LDAP for now)
smolnar82 May 15, 2026
824a9c5
KnoxIDF: add support for auth code flow with PKCE
smolnar82 May 15, 2026
0fb341c
KnoxIDF: fix an issue with the empty user params provider implementation
smolnar82 May 15, 2026
dfaf896
KnoxIDF: Refactor Docker build to use local Maven artifacts and unify…
smolnar82 May 15, 2026
96e5dbe
KnoxIDF: Use constants wherever possible
smolnar82 May 15, 2026
2ba32fa
CheckStyle issue fixed
smolnar82 May 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 32 additions & 26 deletions .github/workflows/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,39 @@ FROM eclipse-temurin:17-jre

MAINTAINER moresandeep

RUN useradd -ms /bin/bash gateway

# Create directories
RUN mkdir /knox-runtime
RUN mkdir /knox-runtime/knoxshell

# Copy artifacts
COPY knox-temp-artifacts /knox-temp-artifacts-staging
COPY knoxshell-temp-artifacts /knoxshell-temp-artifacts-staging

# Move runtime to new location
RUN mv /knox-temp-artifacts-staging/*/* /knox-runtime/ && \
mv /knoxshell-temp-artifacts-staging/*/* /knox-runtime/knoxshell/ && \
rm -rf /knox-temp-artifacts-staging /knoxshell-temp-artifacts-staging

# Add configuration
ADD master /knox-runtime/data/security/master
ADD gateway-site.xml /knox-runtime/conf/gateway-site.xml
ADD conf/topologies/knoxtoken.xml /knox-runtime/conf/topologies/knoxtoken.xml
ADD conf/topologies/knoxldap.xml /knox-runtime/conf/topologies/knoxldap.xml
ADD conf/topologies/remoteauth.xml /knox-runtime/conf/topologies/remoteauth.xml

ADD conf/topologies/health.xml /knox-runtime/conf/topologies/health.xml
# Install dependencies
RUN apt-get update && apt-get install -y git && useradd -ms /bin/bash gateway

# Create temporary directories for extraction
RUN mkdir -p /tmp/knox-artifacts /tmp/knoxshell-artifacts /knox-runtime /knoxshell /knox-runtime/knoxshell

# Copy pre-built tarballs from the local target directory
# In CI, these are built in the previous step.
# Locally, these are built by the developer.
COPY target/*/knox-*.tar.gz /tmp/knox-artifacts/
COPY target/*/knoxshell-*.tar.gz /tmp/knoxshell-artifacts/

# Extract and move to runtime location
RUN tar -xvzf /tmp/knox-artifacts/knox-*.tar.gz -C /tmp/knox-artifacts/ && \
tar -xvzf /tmp/knoxshell-artifacts/knoxshell-*.tar.gz -C /tmp/knoxshell-artifacts/ && \
mv /tmp/knox-artifacts/knox-*/* /knox-runtime/ && \
mv /tmp/knoxshell-artifacts/knoxshell-*/* /knox-runtime/knoxshell/ && \
rm -rf /tmp/knox-artifacts /tmp/knoxshell-artifacts

# Configuration and scripts
ADD .github/workflows/build/master /knox-runtime/data/security/master
ADD .github/workflows/build/gateway-site.xml /knox-runtime/conf/gateway-site.xml
ADD .github/workflows/build/conf/topologies/knoxtoken.xml /knox-runtime/conf/topologies/knoxtoken.xml
ADD .github/workflows/build/conf/topologies/health.xml /knox-runtime/conf/topologies/health.xml
ADD .github/workflows/build/conf/topologies/knoxldap.xml /knox-runtime/conf/topologies/knoxldap.xml
ADD .github/workflows/build/conf/topologies/remoteauth.xml /knox-runtime/conf/topologies/remoteauth.xml
ADD .github/workflows/build/conf/topologies/knoxidf-ldap.xml /knox-runtime/conf/topologies/knoxidf-ldap.xml
ADD .github/workflows/build/conf/topologies/knoxidf-token.xml /knox-runtime/conf/topologies/knoxidf-token.xml

RUN chown -R gateway /knox-runtime/

ADD ldap.sh /ldap.sh
ADD gateway.sh /gateway.sh
ADD .github/workflows/build/ldap.sh /ldap.sh
ADD .github/workflows/build/gateway.sh /gateway.sh

RUN chmod +x /ldap.sh /gateway.sh
RUN chmod +x /ldap.sh
RUN chmod +x /gateway.sh
75 changes: 0 additions & 75 deletions .github/workflows/build/Dockerfile.local

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/build/conf/topologies/knoxidf-ldap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<topology>
<gateway>
<provider>
<role>authentication</role>
<name>ShiroProvider</name>
<enabled>true</enabled>
<param>
<name>main.ldapRealm</name>
<value>org.apache.knox.gateway.shirorealm.KnoxLdapRealm</value>
</param>
<param>
<name>main.ldapRealm.userDnTemplate</name>
<value>uid={0},ou=people,dc=hadoop,dc=apache,dc=org</value>
</param>
<param>
<name>main.ldapRealm.contextFactory.url</name>
<value>ldap://ldap:33389</value>
</param>
<param>
<name>main.ldapRealm.contextFactory.authenticationMechanism</name>
<value>simple</value>
</param>
<param>
<name>urls./knoxidf/api/v1/.well-known/openid-configuration</name>
<value>anon</value>
</param>
<param>
<name>urls./knoxidf/api/v1/client/register</name>
<value>anon</value>
</param>
<param>
<name>urls./knoxidf/api/v1/authorize/callback</name>
<value>anon</value>
</param>
<param>
<name>urls./knoxidf/api/v1/jwks</name>
<value>anon</value>
</param>
<param>
<name>urls./**</name>
<value>authcBasic</value>
</param>
</provider>
<provider>
<role>identity-assertion</role>
<name>Default</name>
<enabled>true</enabled>
</provider>
</gateway>

<service>
<role>KNOXIDF</role>
<param>
<name>knoxidf.knox.token.ttl</name>
<value>60000</value>
</param>
<param>
<name>knoxidf.knox.token.limit.per.user</name>
<value>-1</value>
</param>
<param>
<name>token.exchange.topology.name</name>
<value>knoxidf-token</value>
</param>
</service>
</topology>
42 changes: 42 additions & 0 deletions .github/workflows/build/conf/topologies/knoxidf-token.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<topology>
<gateway>
<provider>
<role>federation</role>
<name>JWTProvider</name>
<enabled>true</enabled>
<param>
<name>knox.token.exp.server-managed</name>
<value>true</value>
</param>
</provider>
<provider>
<role>identity-assertion</role>
<name>Default</name>
<enabled>true</enabled>
</provider>
</gateway>

<service>
<role>KNOXIDF</role>
<param>
<name>knoxidf.knox.token.ttl</name>
<value>86400000</value>
</param>
<param>
<name>knoxidf.knox.token.limit.per.user</name>
<value>-1</value>
</param>
</service>
<service>
<role>KNOXTOKEN</role>
<param>
<name>knox.token.ttl</name>
<value>60000</value>
</param>
<param>
<name>knox.token.limit.per.user</name>
<value>-1</value>
</param>
</service>
</topology>
25 changes: 7 additions & 18 deletions .github/workflows/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,23 @@
# http://www.apache.org/licenses/LICENSE-2.0
# <p>
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

services:
knox-dev:
build:
context: ../build
dockerfile: Dockerfile
image: apache/knox-dev:master

knox-dev-local:
build:
context: ../build
dockerfile: Dockerfile.local
args:
knoxurl: ${knoxurl:-https://github.com/apache/knox.git}
branch: ${branch:-master}
context: ../../../
dockerfile: .github/workflows/build/Dockerfile
image: apache/knox-dev:local-${GITHUB_RUN_ID:-local}-${GITHUB_RUN_ID:-local}

ldap:
image: apache/knox-dev:local-${GITHUB_RUN_ID:-local}-${GITHUB_RUN_ID:-local}
command: /ldap.sh
depends_on:
- knox-dev-local
- knox-dev

knox:
image: apache/knox-dev:local-${GITHUB_RUN_ID:-local}-${GITHUB_RUN_ID:-local}
Expand All @@ -59,5 +50,3 @@ services:
&& pytest --junitxml=test-results.xml"
depends_on:
- knox


2 changes: 1 addition & 1 deletion .github/workflows/publish-test-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ jobs:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/**/*.xml"
files: "artifacts/test-results/**/*.xml"

43 changes: 30 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ jobs:
checks: write
pull-requests: write

env:
KNOX_URL: "https://github.com/apache/knox.git"
BRANCH: "${{ github.head_ref }}" # PR branch being tested

steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -54,20 +50,11 @@ jobs:
-Dshellcheck.skip=true -Dxml.skip=true \
-s .github/workflows/build/settings.xml

- name: Extract Artifacts
run: |
mkdir -p .github/workflows/build/knox-temp-artifacts .github/workflows/build/knoxshell-temp-artifacts
# Extract artifacts to the build directory where Dockerfile expects them
tar -xvzf target/*/knox-*.tar.gz -C .github/workflows/build/knox-temp-artifacts
tar -xvzf target/*/knoxshell-*.tar.gz -C .github/workflows/build/knoxshell-temp-artifacts

- name: Set up Docker Compose
run: docker compose version

- name: Build Docker Images
run: |
export knoxurl=${KNOX_URL}
export branch=${BRANCH:-master}
# Build only knox-dev which is the runtime image using artifacts
docker compose -f ./.github/workflows/compose/docker-compose.yml build knox-dev

Expand All @@ -82,13 +69,43 @@ jobs:
# Run the tests service defined in docker-compose.yml
docker compose -f ./.github/workflows/compose/docker-compose.yml up --exit-code-from tests tests

- name: Collect Knox Logs and Conf
if: always()
run: |
mkdir -p .github/workflows/artifacts/knox-logs
mkdir -p .github/workflows/artifacts/knox-conf
docker compose -f ./.github/workflows/compose/docker-compose.yml cp knox:/knox-runtime/logs .github/workflows/artifacts/knox-logs
docker compose -f ./.github/workflows/compose/docker-compose.yml cp knox:/knox-runtime/conf .github/workflows/artifacts/knox-conf

- name: Upload Test Results
if: (!cancelled())
uses: actions/upload-artifact@v4
with:
name: test-results
path: .github/workflows/tests/test-results.xml

- name: Archive Knox Logs
if: always()
run: tar -cvzf knox-logs.tar.gz -C .github/workflows/artifacts/knox-logs .

- name: Upload Knox Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: knox-logs
path: knox-logs.tar.gz

- name: Archive Knox Conf
if: always()
run: tar -cvzf knox-conf.tar.gz -C .github/workflows/artifacts/knox-conf .

- name: Upload Knox Conf
if: always()
uses: actions/upload-artifact@v4
with:
name: knox-conf
path: knox-conf.tar.gz

- name: Upload Event File
uses: actions/upload-artifact@v4
with:
Expand Down
Loading
Loading