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

Header verifier test #12

Closed
wants to merge 65 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
ab693c6
Removed http channel
peternied Sep 29, 2023
6abd939
Add request source from the netty channel
peternied Sep 29, 2023
da8d0cb
Plumb SecurityRequest into HTTPAuthenticator interface
peternied Sep 29, 2023
26c6b83
Fix all tests
peternied Sep 29, 2023
a825d83
Prevent build break for generalized testing associated with SecurityR…
peternied Sep 29, 2023
095d4e5
Spotless
peternied Sep 29, 2023
6580e7f
Disable createHeaderVerifier so builds can pass
peternied Sep 29, 2023
8c44278
Implement SecurityRequest gaps
peternied Sep 29, 2023
9b5fe42
Fix spotless
peternied Sep 29, 2023
22f44d3
Improve serialization speeds (#2802)
parasjain1 Sep 29, 2023
9f369cb
Redo how reRequestAuthentication works
peternied Oct 1, 2023
46358a2
Nix that idea
peternied Oct 1, 2023
fa98ba9
Cleaning up some
peternied Oct 1, 2023
9844df9
Mild switch to RequestChannel
peternied Oct 2, 2023
8ea5e56
dependabot: bump org.xerial.snappy:snappy-java from 1.1.10.4 to 1.1.1…
dependabot[bot] Oct 2, 2023
97dea2a
dependabot: bump org.ow2.asm:asm from 9.5 to 9.6 (#3433)
dependabot[bot] Oct 2, 2023
567217c
dependabot: bump org.apache.camel:camel-xmlsecurity from 3.21.0 to 3.…
dependabot[bot] Oct 2, 2023
fa52472
dependabot: bump com.github.wnameless.json:json-base from 2.4.2 to 2.…
dependabot[bot] Oct 2, 2023
702cc3c
dependabot: bump commons-io:commons-io from 2.13.0 to 2.14.0 (#3431)
dependabot[bot] Oct 2, 2023
cafe1c7
Handle unsupported scenarios
peternied Oct 2, 2023
1ffa23c
[Enhancement] Setup auth token utils for obo (#3419)
RyanL1997 Oct 2, 2023
2beb434
Tests compile again
peternied Oct 2, 2023
2ef4c3f
Fix spotless issues
peternied Oct 2, 2023
4970a49
Merge remote-tracking branch 'origin/main' into headerverifier
peternied Oct 2, 2023
87646d7
Fix merging from main changes
peternied Oct 2, 2023
547218b
Restore default build.gradle settings
peternied Oct 3, 2023
d44d277
Fix bug in authn/z stages of handler wrapper
peternied Oct 3, 2023
7924da1
Refactors reRequestAuthentication to call notifyIpAuthFailureListener…
DarshitChanpura Oct 3, 2023
b960aac
Focus channel implementation
peternied Oct 3, 2023
4d9506c
Merge remote-tracking branch 'origin/main' into headerverifier
peternied Oct 3, 2023
3111665
Fix merge conflict related issues
peternied Oct 3, 2023
2aad250
Seperate read-only vs read-write scenarios
peternied Oct 3, 2023
9a915e7
Spotless
peternied Oct 3, 2023
e749a8e
more cleanup
peternied Oct 3, 2023
20c9ea7
Rename concrete classes
peternied Oct 3, 2023
22991e3
Maybe final changes batch
peternied Oct 3, 2023
828ef2b
Fix parameter consumption
peternied Oct 3, 2023
641c195
Fix incorrect error message
peternied Oct 3, 2023
74a925d
javadoc
peternied Oct 3, 2023
e4a1b77
Support security config updates on the REST API using permission (#3264)
willyborankin Oct 4, 2023
93f79f8
[Build Break] Update custom serialization min supported version (#3458)
peternied Oct 4, 2023
21e1030
Remove the Authenticatiion verifier
peternied Oct 3, 2023
09207c2
Debug statement
peternied Oct 4, 2023
659088d
Even more logging
peternied Oct 4, 2023
c019f02
Even more loogging
peternied Oct 4, 2023
e8e5155
Even more logging
peternied Oct 4, 2023
9ffa147
Add more logging
peternied Oct 4, 2023
613acab
move logging location
peternied Oct 4, 2023
2125f9f
Refactor to optional in progress
peternied Oct 4, 2023
edbe2be
Restore changes around passing unsent response
peternied Oct 4, 2023
33aa863
revert logging changes
peternied Oct 4, 2023
0c5a97d
Fix spotless
peternied Oct 4, 2023
2f58523
Fix exception name
peternied Oct 4, 2023
5dc3033
Copyright headers
peternied Oct 4, 2023
e323823
PR comments
peternied Oct 4, 2023
8752074
Redirect deprecation messages to stderr. (#3454)
davidosorno Oct 5, 2023
177ad11
Fix issue with saml tests
peternied Oct 5, 2023
1312d2c
Fine tunning cr pass
peternied Oct 5, 2023
28f620b
Fix bad auth realm
peternied Oct 5, 2023
38c34cb
Fix build break
peternied Oct 5, 2023
bfba97a
Add tracer to Transport (#3463)
Gaganjuneja Oct 5, 2023
641130f
Clean up allow list systems
peternied Oct 5, 2023
7940233
Merge remote-tracking branch 'origin/main' into headerverifier
peternied Oct 5, 2023
8701359
switch from complete to queue requests
peternied Oct 5, 2023
e7b0916
Fix checkstyle issue
peternied Oct 5, 2023
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
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,24 @@ jobs:
arguments: |
integrationTest -Dbuild.snapshot=false

backward-compatibility-build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v3
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 17

- name: Checkout Security Repo
uses: actions/checkout@v4

- name: Build BWC tests
uses: gradle/gradle-build-action@v2
with:
cache-disabled: true
arguments: |
-p bwc-test build -x test -x integTest

backward-compatibility:
strategy:
fail-fast: false
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ configurations {
force "io.netty:netty-transport-native-unix-common:${versions.netty}"
force "org.apache.bcel:bcel:6.7.0" // This line should be removed once Spotbugs is upgraded to 4.7.4
force "com.github.luben:zstd-jni:${versions.zstd}"
force "org.xerial.snappy:snappy-java:1.1.10.4"
force "org.xerial.snappy:snappy-java:1.1.10.5"
force "com.google.guava:guava:${guava_version}"
}
}
Expand Down Expand Up @@ -494,7 +494,7 @@ dependencies {
implementation "io.jsonwebtoken:jjwt-impl:${jjwt_version}"
implementation "io.jsonwebtoken:jjwt-jackson:${jjwt_version}"
// JSON flattener
implementation ("com.github.wnameless.json:json-base:2.4.2") {
implementation ("com.github.wnameless.json:json-base:2.4.3") {
exclude group: "org.glassfish", module: "jakarta.json"
exclude group: "com.google.code.gson", module: "gson"
exclude group: "org.json", module: "json"
Expand Down Expand Up @@ -525,9 +525,9 @@ dependencies {
runtimeOnly 'com.google.errorprone:error_prone_annotations:2.22.0'
runtimeOnly 'com.sun.istack:istack-commons-runtime:4.2.0'
runtimeOnly 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0'
runtimeOnly 'org.ow2.asm:asm:9.5'
runtimeOnly 'org.ow2.asm:asm:9.6'

testImplementation 'org.apache.camel:camel-xmlsecurity:3.21.0'
testImplementation 'org.apache.camel:camel-xmlsecurity:3.21.1'

//OpenSAML
implementation 'net.shibboleth.utilities:java-support:8.4.0'
Expand Down Expand Up @@ -559,7 +559,7 @@ dependencies {
runtimeOnly 'io.dropwizard.metrics:metrics-core:4.2.19'
runtimeOnly 'org.slf4j:slf4j-api:1.7.36'
runtimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}"
runtimeOnly 'org.xerial.snappy:snappy-java:1.1.10.4'
runtimeOnly 'org.xerial.snappy:snappy-java:1.1.10.5'
runtimeOnly 'org.codehaus.woodstox:stax2-api:4.2.1'
runtimeOnly "org.glassfish.jaxb:txw2:${jaxb_version}"
runtimeOnly 'com.fasterxml.woodstox:woodstox-core:6.5.1'
Expand Down Expand Up @@ -627,7 +627,7 @@ dependencies {
integrationTestImplementation 'junit:junit:4.13.2'
integrationTestImplementation "org.opensearch.plugin:reindex-client:${opensearch_version}"
integrationTestImplementation "org.opensearch.plugin:percolator-client:${opensearch_version}"
integrationTestImplementation 'commons-io:commons-io:2.13.0'
integrationTestImplementation 'commons-io:commons-io:2.14.0'
integrationTestImplementation "org.apache.logging.log4j:log4j-core:${versions.log4j}"
integrationTestImplementation "org.apache.logging.log4j:log4j-jul:${versions.log4j}"
integrationTestImplementation 'org.hamcrest:hamcrest:2.2'
Expand Down
4 changes: 4 additions & 0 deletions bwc-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ buildscript {
opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT")
opensearch_group = "org.opensearch"
common_utils_version = System.getProperty("common_utils.version", '2.9.0.0-SNAPSHOT')
jackson_version = System.getProperty("jackson_version", "2.15.2")
}
repositories {
mavenLocal()
Expand All @@ -72,6 +73,9 @@ dependencies {
testImplementation "org.opensearch.test:framework:${opensearch_version}"
testImplementation "org.apache.logging.log4j:log4j-core:${versions.log4j}"
testImplementation "org.opensearch:common-utils:${common_utils_version}"
testImplementation "com.fasterxml.jackson.core:jackson-databind:${jackson_version}"
testImplementation "com.fasterxml.jackson.core:jackson-annotations:${jackson_version}"

}

loggerUsageCheck.enabled = false
Expand Down
205 changes: 0 additions & 205 deletions bwc-test/src/test/java/SecurityBackwardsCompatibilityIT.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

package org.opensearch.security.bwc;

public enum ClusterType {
OLD,
MIXED,
UPGRADED;

public static ClusterType parse(String value) {
switch (value) {
case "old_cluster":
return OLD;
case "mixed_cluster":
return MIXED;
case "upgraded_cluster":
return UPGRADED;
default:
throw new AssertionError("unknown cluster type: " + value);
}
}
}
Loading
Loading