Skip to content

Commit bd8289d

Browse files
authored
Merge pull request #1 from AthenZ/mvp
first release with Athenz, Okta, Github and Google providers
2 parents d916e56 + 4450fb6 commit bd8289d

File tree

129 files changed

+17459
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+17459
-2
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
!target/*-runner
3+
!target/*-runner.jar
4+
!target/lib/*
5+
!target/quarkus-app/*

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: wednesday
8+
time: "19:00"
9+
allow:
10+
- dependency-type: all

.github/workflows/build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Main Branch build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
8+
permissions:
9+
actions: none
10+
checks: none
11+
contents: read
12+
deployments: none
13+
issues: none
14+
discussions: none
15+
packages: none
16+
pull-requests: none
17+
repository-projects: none
18+
security-events: none
19+
statuses: none
20+
21+
env:
22+
JAVA_VERSION_FULL_BUILD: 21
23+
JAVA_DISTRO: temurin
24+
JAVA_ARCH: x64
25+
26+
jobs:
27+
build:
28+
runs-on: ubuntu-latest-4-cores
29+
steps:
30+
- name: Checkout repository
31+
id: checkout
32+
uses: actions/checkout@v5
33+
34+
- name: Setup Java
35+
id: setup-java
36+
uses: actions/setup-java@v5
37+
with:
38+
java-version: ${{ env.JAVA_VERSION_FULL_BUILD }}
39+
distribution: ${{ env.JAVA_DISTRO }}
40+
architecture: ${{ env.JAVA_ARCH }}
41+
42+
- name: Build mcp-oauth-proxy
43+
run: mvn -B install

.github/workflows/pull-request.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Pull requests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 'main'
7+
8+
permissions:
9+
actions: none
10+
checks: none
11+
contents: read
12+
deployments: none
13+
issues: none
14+
discussions: none
15+
packages: none
16+
pull-requests: none
17+
repository-projects: none
18+
security-events: none
19+
statuses: none
20+
21+
env:
22+
JAVA_VERSION_FULL_BUILD: 21
23+
JAVA_DISTRO: temurin
24+
JAVA_ARCH: x64
25+
26+
jobs:
27+
build:
28+
runs-on: ubuntu-latest-4-cores
29+
steps:
30+
- name: Checkout repository
31+
id: checkout
32+
uses: actions/checkout@v5
33+
34+
- name: Setup Java
35+
id: setup-java
36+
uses: actions/setup-java@v5
37+
with:
38+
java-version: ${{ env.JAVA_VERSION_FULL_BUILD }}
39+
distribution: ${{ env.JAVA_DISTRO }}
40+
architecture: ${{ env.JAVA_ARCH }}
41+
42+
- name: Build mcp-oauth-proxy
43+
run: mvn -B install

.gitignore

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#Maven
2+
target/
3+
pom.xml.tag
4+
pom.xml.releaseBackup
5+
pom.xml.versionsBackup
6+
release.properties
7+
.flattened-pom.xml
8+
9+
# Eclipse
10+
.project
11+
.classpath
12+
.settings/
13+
bin/
14+
15+
# IntelliJ
16+
.idea
17+
*.ipr
18+
*.iml
19+
*.iws
20+
21+
# NetBeans
22+
nb-configuration.xml
23+
24+
# Visual Studio Code
25+
.vscode
26+
.factorypath
27+
28+
# OSX
29+
.DS_Store
30+
31+
# Vim
32+
*.swp
33+
*.swo
34+
35+
# patch
36+
*.orig
37+
*.rej
38+
39+
# Local environment
40+
.env
41+
42+
# Plugin directory
43+
/.quarkus/cli/plugins/
44+
# TLS Certificates
45+
.certs/
46+
authentication.conf
47+
tmp_out/
48+
k8s_reconn.sh
49+
tls.cert.pem
50+
tls.key.pem
51+
jwt-signing-key.pem
52+
client-id
53+
client-secret
54+
*-client-secret
55+
OAUTH21_AUTHORIZATION_ENDPOINT.md
56+
RFC6749_IMPLEMENTATION.md
57+
/src/main/resources/application-dev.yaml

.mvn/wrapper/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maven-wrapper.jar
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import java.io.IOException;
21+
import java.io.InputStream;
22+
import java.net.Authenticator;
23+
import java.net.PasswordAuthentication;
24+
import java.net.URI;
25+
import java.net.URL;
26+
import java.nio.file.Files;
27+
import java.nio.file.Path;
28+
import java.nio.file.Paths;
29+
import java.nio.file.StandardCopyOption;
30+
import java.util.concurrent.ThreadLocalRandom;
31+
32+
public final class MavenWrapperDownloader {
33+
private static final String WRAPPER_VERSION = "3.3.2";
34+
35+
private static final boolean VERBOSE = Boolean.parseBoolean(System.getenv("MVNW_VERBOSE"));
36+
37+
public static void main(String[] args) {
38+
log("Apache Maven Wrapper Downloader " + WRAPPER_VERSION);
39+
40+
if (args.length != 2) {
41+
System.err.println(" - ERROR wrapperUrl or wrapperJarPath parameter missing");
42+
System.exit(1);
43+
}
44+
45+
try {
46+
log(" - Downloader started");
47+
final URL wrapperUrl = URI.create(args[0]).toURL();
48+
final String jarPath = args[1].replace("..", ""); // Sanitize path
49+
final Path wrapperJarPath = Paths.get(jarPath).toAbsolutePath().normalize();
50+
downloadFileFromURL(wrapperUrl, wrapperJarPath);
51+
log("Done");
52+
} catch (IOException e) {
53+
System.err.println("- Error downloading: " + e.getMessage());
54+
if (VERBOSE) {
55+
e.printStackTrace();
56+
}
57+
System.exit(1);
58+
}
59+
}
60+
61+
private static void downloadFileFromURL(URL wrapperUrl, Path wrapperJarPath)
62+
throws IOException {
63+
log(" - Downloading to: " + wrapperJarPath);
64+
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
65+
final String username = System.getenv("MVNW_USERNAME");
66+
final char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
67+
Authenticator.setDefault(new Authenticator() {
68+
@Override
69+
protected PasswordAuthentication getPasswordAuthentication() {
70+
return new PasswordAuthentication(username, password);
71+
}
72+
});
73+
}
74+
Path temp = wrapperJarPath
75+
.getParent()
76+
.resolve(wrapperJarPath.getFileName() + "."
77+
+ Long.toUnsignedString(ThreadLocalRandom.current().nextLong()) + ".tmp");
78+
try (InputStream inStream = wrapperUrl.openStream()) {
79+
Files.copy(inStream, temp, StandardCopyOption.REPLACE_EXISTING);
80+
Files.move(temp, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING);
81+
} finally {
82+
Files.deleteIfExists(temp);
83+
}
84+
log(" - Downloader complete");
85+
}
86+
87+
private static void log(String msg) {
88+
if (VERBOSE) {
89+
System.out.println(msg);
90+
}
91+
}
92+
93+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=source
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
20+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar

0 commit comments

Comments
 (0)