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

V3.9 #40

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open

V3.9 #40

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
36f4224
added registercanary header (#28)
ramyaravi-opsmx Jul 16, 2021
601e858
v5 endpoint bypassed
Pranav-b-7 Jul 26, 2021
ec8e879
Merge pull request #30 from OpsMx/OP-7120-v3.9
ramyaravi-opsmx Jul 26, 2021
fc5db13
enabled prometheus metrics
Pranav-b-7 Aug 4, 2021
0f4ab57
Merge pull request #32 from OpsMx/OP-6746-v3.9
ramyaravi-opsmx Aug 4, 2021
b157a21
enable prometheus metrics config added
Pranav-b-7 Aug 5, 2021
7a82f16
Merge pull request #34 from OpsMx/OP-6746-v3.9
ramyaravi-opsmx Aug 5, 2021
7252c34
Op 7241 v3.9 (#37)
Luthan95 Aug 23, 2021
a9fd89c
adding wget package
Luthan95 Aug 23, 2021
6264323
Update README.md
yugaa22 Sep 9, 2021
dbe11c5
Update README.md
yugaa22 Sep 13, 2021
deb7722
OP-7604: Added log to see status code
rahul-chekuri Oct 4, 2021
33a0098
OP-7604: returning response to avoid status code issue
rahul-chekuri Oct 5, 2021
21effb1
OP-7604: logs statements
rahul-chekuri Oct 5, 2021
0d34bae
OP-7604: logs statements
rahul-chekuri Oct 5, 2021
6829e5d
OP-7604: logs statements
rahul-chekuri Oct 5, 2021
86be87d
OP-7604: logs statements
rahul-chekuri Oct 5, 2021
e3060d7
OP-7604: Handling exception cases
rahul-chekuri Oct 5, 2021
a6bd66e
OP-7604: Handling exception cases
rahul-chekuri Oct 5, 2021
21abf31
OP-7604: Handling exception cases
rahul-chekuri Oct 5, 2021
af37578
OP-7604: Handling exception cases
rahul-chekuri Oct 5, 2021
5d77506
OP-7604: Handling exception cases
rahul-chekuri Oct 5, 2021
ec2d17b
OP-7604: Handling exception cases
rahul-chekuri Oct 5, 2021
3ead41b
OP-7604: Handling exception cases
rahul-chekuri Oct 5, 2021
363291a
OP-7604: Removed copy right
rahul-chekuri Oct 5, 2021
63d9862
OP-7604: Logging the errors
rahul-chekuri Oct 5, 2021
78c60b2
Merge pull request #48 from OpsMx/OP-7604-logs
ramyaravi-opsmx Oct 5, 2021
e59544b
OP-7668 : Added mapping URLs
sriharshakancharla Oct 7, 2021
8e50230
Merge pull request #51 from OpsMx/OP-7668-v3.9
sriharshakancharla Oct 7, 2021
5ee0210
auth turned off for /oes/echo/
Pranav-b-7 Oct 7, 2021
f329a41
Merge pull request #54 from OpsMx/OP-7653-v3.9
ramyaravi-opsmx Oct 7, 2021
a942408
OP-7390: Bug fix for cloud provider response failed status return
sudhakaropsmx Oct 11, 2021
973b7e7
Merge pull request #62 from OpsMx/OP-7390-v3.9
sriharshakancharla Oct 11, 2021
12742af
Op 7784 v3.9 (#72)
Pranav-b-7 Oct 19, 2021
282150f
Apple automation (#80)
Pranav-b-7 Nov 16, 2021
fbfe333
OP-10214: Using RetryOnExceptionAuthManager to handle LDAP connection…
rahul-chekuri Dec 13, 2021
3a1e435
log4j version updated to 2.16.0 (#92)
Pranav-b-7 Dec 15, 2021
8f43435
Update Dockerfile.rhel8-ubi8
Luthan95 Dec 16, 2021
b29ca89
OP-10610: CherryPick MAster
rahul-chekuri Dec 16, 2021
057518d
upgraded the fiat version, kork version and spinnaker gradle version …
Pranav-b-7 Dec 16, 2021
d608b9e
OP-7927: Corrected defective logic
rahul-chekuri Dec 22, 2021
f7eeea9
OP-12364: Cherry picked auth bug fix (#127)
rahul-chekuri Feb 8, 2022
24ba7df
added deploymentId and history params
Pranav-b-7 Jan 4, 2022
ea3ef32
Merge pull request #133 from OpsMx/OP-11515-v3.9
ramyaravi-opsmx Feb 8, 2022
db42bd1
Added retrofit error handler
Pranav-b-7 Feb 8, 2022
97e8061
Merge pull request #135 from OpsMx/OP-7901-v3.9-new
ramyaravi-opsmx Feb 8, 2022
c420297
reverted the retrofit error handling
Pranav-b-7 Feb 9, 2022
5553b43
Merge pull request #139 from OpsMx/OP-7901-v3.9-retrofitErrorHandling
sriharshakancharla Feb 9, 2022
b35311a
OP-11995: Added favicon.ico to the login page. (#167)
rahul-chekuri Mar 21, 2022
6cd5dee
anonymous group
Pranav-b-7 Mar 23, 2022
560f929
added default user-group when the user is not assigned to any groups
Pranav-b-7 Mar 23, 2022
ee91601
Merge pull request #177 from OpsMx/OP-7652-no-groups-found-v3.9
sriharshakancharla Mar 23, 2022
a236ef6
OP-14834: Added new filter to handle token expiring cases (#211)
rahul-chekuri May 25, 2022
f2218ad
OP-14834: Added missing import statement
rahul-chekuri May 25, 2022
c419afe
Merge pull request #214 from OpsMx/OP-14834-Saml-V3.9
gopaljayanthi May 25, 2022
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Spinnaker Gateway Service
Spinnaker Gateway Service
------------------------------------
[![Build Status](https://api.travis-ci.org/spinnaker/gate.svg?branch=master)](https://travis-ci.org/spinnaker/gate)

Expand Down
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ allprojects {
annotationProcessor "org.projectlombok:lombok"
testAnnotationProcessor "org.projectlombok:lombok"
compile("org.springframework.cloud:spring-cloud-starter-vault-config")
compile("io.micrometer:micrometer-registry-prometheus")


implementation "org.codehaus.groovy:groovy-all"
Expand All @@ -51,6 +52,11 @@ allprojects {
configurations.all {
exclude group: 'javax.servlet', module: 'servlet-api'
exclude group: 'javax.servlet', module: 'javax.servlet-api'
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.apache.logging.log4j') {
details.useVersion '2.16.0'
}
}
}

tasks.withType(JavaExec) {
Expand Down
58 changes: 58 additions & 0 deletions docker/custom-plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[
{
"id": "Opsmx.VerificationGatePlugin",
"description": "An example of a PF4J-based plugin that provides a custom pipeline stage.",
"releases": [
{
"version": "1.0.1",
"date": "2021-06-24T16:20:59.469168Z",
"requires": "orca>=0.0.0,deck>=0.0.0",
"sha512sum": "VERIFICATION_SHASUM",
"state": "",
"url": "file:///opt/spinnaker/plugins/VerificationPlugin-v1.0.1-SNAPSHOT.zip"
}
]
},
{
"id": "Opsmx.TestVerificationGatePlugin",
"description": "An example of a PF4J-based plugin that provides a custom pipeline stage.",
"releases": [
{
"version": "1.0.1",
"date": "2021-07-25T16:20:59.469168Z",
"requires": "orca>=0.0.0,deck>=0.0.0",
"sha512sum": "TESTVERIFICATION_SHASUM",
"state": "",
"url": "file:///opt/spinnaker/plugins/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip"
}
]
},
{
"id": "Opsmx.VisibilityApprovalPlugin",
"description": "An example of a PF4J-based plugin that provides a custom policy stage.",
"releases": [
{
"version": "1.0.1",
"date": "2021-07-20T16:20:59.469168Z",
"requires": "orca>=0.0.0,deck>=0.0.0",
"sha512sum": "APPROVAL_SHASUM",
"state": "",
"url": "file:///opt/spinnaker/plugins/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip"
}
]
},
{
"id": "Opsmx.PolicyGatePlugin",
"description": "An example of a PF4J-based plugin that provides a custom policy stage.",
"releases": [
{
"version": "1.0.1",
"date": "2021-07-25T16:20:59.469168Z",
"requires": "orca>=0.0.0,deck>=0.0.0",
"sha512sum": "POLICY_SHASUM",
"state": "",
"url": "file:///opt/spinnaker/plugins/policyPlugin-v1.0.1-SNAPSHOT.zip"
}
]
}
]
21 changes: 20 additions & 1 deletion docker/ubi8/Gate-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ COPY ./gate-web/build/install/gate /opt/gate
RUN yum -y install java-11-openjdk-headless.x86_64 wget vim curl net-tools nettle
RUN yum -y update
RUN adduser spinnaker
RUN mkdir -p /opt/gate/plugins
RUN mkdir -p /opt/gate/plugins && mkdir -p /opt/spinnaker/plugins
####adding customplugin zip
ARG CUSTOMPLUGIN_RELEASEVERSION
ENV CUSTOMPLUGIN_RELEASEVERSION=$CUSTOMPLUGIN_RELEASEVERSION
COPY custom-plugin.json /opt/spinnaker/plugins/plugins.json
RUN wget -O VerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Pf4jCustomStagePlugin/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/VerificationPlugin-v1.0.1-SNAPSHOT.zip \
&& wget -O TestVerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Pf4jCustomStagePlugin/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip \
&& wget -O policyPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Pf4jCustomStagePlugin/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/policyPlugin-v1.0.1-SNAPSHOT.zip \
&& wget -O ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Pf4jCustomStagePlugin/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip
RUN mv VerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \
&& mv TestVerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \
&& mv policyPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \
&& mv ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/

RUN sed -i 's/"VERIFICATION_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/VerificationPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \
&& sed -i 's/"TESTVERIFICATION_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \
&& sed -i 's/"POLICY_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/policyPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \
&& sed -i 's/"APPROVAL_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json
RUN chown -R spinnaker:spinnaker /opt/spinnaker
#####
USER spinnaker
CMD ["/opt/gate/bin/gate"]
21 changes: 20 additions & 1 deletion docker/ubuntu/Gate-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@ MAINTAINER [email protected]
COPY ./gate-web/build/install/gate /opt/gate
RUN apt-get update && apt-get -y install openjdk-8-jre-headless wget vim net-tools curl
RUN adduser --disabled-login --system spinnaker
RUN mkdir -p /opt/gate/plugins && chown -R spinnaker:nogroup /opt/gate/plugins
RUN mkdir -p /opt/gate/plugins && chown -R spinnaker:nogroup /opt/gate/plugins && mkdir -p /opt/spinnaker/plugins
####adding customplugin zip
ARG CUSTOMPLUGIN_RELEASEVERSION
ENV CUSTOMPLUGIN_RELEASEVERSION=$CUSTOMPLUGIN_RELEASEVERSION
COPY custom-plugin.json /opt/spinnaker/plugins/plugins.json
RUN wget -O VerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Pf4jCustomStagePlugin/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/VerificationPlugin-v1.0.1-SNAPSHOT.zip \
&& wget -O TestVerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Pf4jCustomStagePlugin/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip \
&& wget -O policyPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Pf4jCustomStagePlugin/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/policyPlugin-v1.0.1-SNAPSHOT.zip \
&& wget -O ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Pf4jCustomStagePlugin/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip
RUN mv VerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \
&& mv TestVerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \
&& mv policyPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \
&& mv ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/

RUN sed -i 's/"VERIFICATION_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/VerificationPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \
&& sed -i 's/"TESTVERIFICATION_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \
&& sed -i 's/"POLICY_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/policyPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \
&& sed -i 's/"APPROVAL_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json
RUN chown -R spinnaker:spinnaker /opt/spinnaker
#####
USER spinnaker
CMD ["/opt/gate/bin/gate"]
23 changes: 21 additions & 2 deletions docker_build/Dockerfile.rhel8-ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ COPY /docker_build/nginx.repo /etc/yum.repos.d/nginx.repo
RUN adduser opsmx \
&& usermod -aG wheel opsmx \
&& mkdir -p /opsmx/workdir/logs \
&& mkdir -p /opt/spinnaker/config
&& mkdir -p /opt/spinnaker/config \
&& mkdir -p /opt/spinnaker/plugins

# Install procps(ps)
RUN yum install -y procps nginx net-tools
RUN yum install -y procps nginx net-tools wget
# Install java 11
RUN yum -y install java-11-openjdk-headless.x86_64
# Install ping
Expand All @@ -32,6 +33,24 @@ COPY /docker_build/gate.yml /opt/spinnaker/config/
COPY /docker_build/startup.sh /opsmx/workdir/
RUN chmod +x /opsmx/workdir/startup.sh

# === CUSTOM PLUGINS
ARG CUSTOMPLUGIN_RELEASEVERSION
ENV CUSTOMPLUGIN_RELEASEVERSION=$CUSTOMPLUGIN_RELEASEVERSION
COPY /docker_build/custom-plugin.json /opt/spinnaker/plugins/plugins.json
RUN wget -O VerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/VerificationPlugin-v1.0.1-SNAPSHOT.zip \
&& wget -O TestVerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip \
&& wget -O policyPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/policyPlugin-v1.0.1-SNAPSHOT.zip \
&& wget -O ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip
RUN mv VerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \
&& mv TestVerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \
&& mv policyPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \
&& mv ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/

RUN sed -i 's/"VERIFICATION_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/VerificationPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \
&& sed -i 's/"TESTVERIFICATION_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \
&& sed -i 's/"POLICY_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/policyPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \
&& sed -i 's/"APPROVAL_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json

# === Copy Gate Build Files ===
COPY /gate-web/build/install/gate /opsmx/workdir/gate
RUN chown -R opsmx:root ${WORK_DIR}/* /opt/* && chmod 777 /opt/* ${WORK_DIR}/*
Expand Down
58 changes: 58 additions & 0 deletions docker_build/custom-plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[
{
"id": "Opsmx.VerificationGatePlugin",
"description": "An example of a PF4J-based plugin that provides a custom pipeline stage.",
"releases": [
{
"version": "1.0.1",
"date": "2021-06-24T16:20:59.469168Z",
"requires": "orca>=0.0.0,deck>=0.0.0",
"sha512sum": "VERIFICATION_SHASUM",
"state": "",
"url": "file:///opt/spinnaker/plugins/VerificationPlugin-v1.0.1-SNAPSHOT.zip"
}
]
},
{
"id": "Opsmx.TestVerificationGatePlugin",
"description": "An example of a PF4J-based plugin that provides a custom pipeline stage.",
"releases": [
{
"version": "1.0.1",
"date": "2021-07-25T16:20:59.469168Z",
"requires": "orca>=0.0.0,deck>=0.0.0",
"sha512sum": "TESTVERIFICATION_SHASUM",
"state": "",
"url": "file:///opt/spinnaker/plugins/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip"
}
]
},
{
"id": "Opsmx.VisibilityApprovalPlugin",
"description": "An example of a PF4J-based plugin that provides a custom policy stage.",
"releases": [
{
"version": "1.0.1",
"date": "2021-07-20T16:20:59.469168Z",
"requires": "orca>=0.0.0,deck>=0.0.0",
"sha512sum": "APPROVAL_SHASUM",
"state": "",
"url": "file:///opt/spinnaker/plugins/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip"
}
]
},
{
"id": "Opsmx.PolicyGatePlugin",
"description": "An example of a PF4J-based plugin that provides a custom policy stage.",
"releases": [
{
"version": "1.0.1",
"date": "2021-07-25T16:20:59.469168Z",
"requires": "orca>=0.0.0,deck>=0.0.0",
"sha512sum": "POLICY_SHASUM",
"state": "",
"url": "file:///opt/spinnaker/plugins/policyPlugin-v1.0.1-SNAPSHOT.zip"
}
]
}
]
27 changes: 27 additions & 0 deletions docker_build/gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ services:
enabled: true
oesui:
externalUrl: http://150.238.22.102

retrofit:
connectTimeout: 30000
readTimeout: 30000
callTimeout: 30000
writeTimeout: 30000
retryOnConnectionFailure: true

security:
basic:
enabled: false
Expand Down Expand Up @@ -80,3 +88,22 @@ server:
protocolHeader: X-Forwarded-Proto
remoteIpHeader: X-Forwarded-For
internalProxies: .*

management:
health:
elasticsearch:
enabled: false
ldap:
enabled: false
endpoints:
web:
exposure:
include: health,info,metrics,prometheus
endpoint:
health:
show-details: always
show-components: always

gate:
installation:
mode: common
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,30 @@ class AuthConfig {
.antMatchers(HttpMethod.POST,'/visibilityservice/v1/approvalGates/{id}/trigger').permitAll()
.antMatchers(HttpMethod.POST,'/visibilityservice/v2/approvalGates/{id}/trigger').permitAll()
.antMatchers(HttpMethod.POST,'/visibilityservice/v4/approvalGates/{id}/trigger').permitAll()
.antMatchers(HttpMethod.POST,'/visibilityservice/v5/approvalGates/{id}/trigger').permitAll()
.antMatchers(HttpMethod.GET,'/visibilityservice/v2/approvalGateInstances/{id}/status').permitAll()
.antMatchers(HttpMethod.GET,'/visibilityservice/v1/approvalGateInstances/{id}/status').permitAll()
.antMatchers(HttpMethod.POST,'/oes/echo').permitAll()
.antMatchers(HttpMethod.POST,'/oes/echo/').permitAll()
.antMatchers(HttpMethod.GET,'/autopilot/mgmt/**').permitAll()
.antMatchers('/plugins/deck/**').permitAll()
.antMatchers(HttpMethod.POST, '/webhooks/**').permitAll()
.antMatchers(HttpMethod.POST, '/notifications/callbacks/**').permitAll()
.antMatchers(HttpMethod.POST, '/managed/notifications/callbacks/**').permitAll()
.antMatchers(HttpMethod.GET, '/oes/accountsConfig/v2/agents/apple/automation').permitAll()
.antMatchers(HttpMethod.POST, '/oes/accountsConfig/v1/agents/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/oes/accountsConfig/v1/agents/{agentName}/manifest/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/oes/accountsConfig/v2/spinnaker/cloudProviderAccount/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/oes/accountsConfig/v2/spinnaker/cloudProviderAccount/{agentName}/{accountName}/apple/automation').permitAll()
.antMatchers(HttpMethod.POST, '/oes/accountsConfig/v2/spinnaker/cloudProviderAccount/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/oes/accountsConfig/v3/spinnaker/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/dashboardservice/v4/getAllDatasources/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/dashboardservice/v5/agents/{agentName}/accounts/{accountName}/accountType/{accountType}/apple/automation').permitAll()
.antMatchers(HttpMethod.POST, '/dashboardservice/v4/datasource/apple/automation').permitAll()
.antMatchers('/health').permitAll()
.antMatchers('/prometheus').permitAll()
.antMatchers('/info').permitAll()
.antMatchers('/metrics').permitAll()
.antMatchers('/**').authenticated()

if (fiatSessionFilterEnabled) {
Expand Down Expand Up @@ -172,17 +187,32 @@ class AuthConfig {
.antMatchers(HttpMethod.POST,'/visibilityservice/v1/approvalGates/{id}/trigger').permitAll()
.antMatchers(HttpMethod.POST,'/visibilityservice/v2/approvalGates/{id}/trigger').permitAll()
.antMatchers(HttpMethod.POST,'/visibilityservice/v4/approvalGates/{id}/trigger').permitAll()
.antMatchers(HttpMethod.POST,'/visibilityservice/v5/approvalGates/{id}/trigger').permitAll()
.antMatchers(HttpMethod.GET,'/visibilityservice/v2/approvalGateInstances/{id}/status').permitAll()
.antMatchers(HttpMethod.GET,'/visibilityservice/v1/approvalGateInstances/{id}/status').permitAll()
.antMatchers(HttpMethod.POST,'/oes/echo').permitAll()
.antMatchers(HttpMethod.POST,'/oes/echo/').permitAll()
.antMatchers(HttpMethod.GET,'/autopilot/mgmt/**').permitAll()
.antMatchers('/**/favicon.ico').permitAll()
.antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
.antMatchers(PermissionRevokingLogoutSuccessHandler.LOGGED_OUT_URL).permitAll()
.antMatchers('/plugins/deck/**').permitAll()
.antMatchers(HttpMethod.POST, '/webhooks/**').permitAll()
.antMatchers(HttpMethod.POST, '/notifications/callbacks/**').permitAll()
.antMatchers(HttpMethod.GET, '/oes/accountsConfig/v2/agents/apple/automation').permitAll()
.antMatchers(HttpMethod.POST, '/oes/accountsConfig/v1/agents/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/oes/accountsConfig/v1/agents/{agentName}/manifest/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/oes/accountsConfig/v2/spinnaker/cloudProviderAccount/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/oes/accountsConfig/v2/spinnaker/cloudProviderAccount/{agentName}/{accountName}/apple/automation').permitAll()
.antMatchers(HttpMethod.POST, '/oes/accountsConfig/v2/spinnaker/cloudProviderAccount/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/oes/accountsConfig/v3/spinnaker/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/dashboardservice/v4/getAllDatasources/apple/automation').permitAll()
.antMatchers(HttpMethod.GET, '/dashboardservice/v5/agents/{agentName}/accounts/{accountName}/accountType/{accountType}/apple/automation').permitAll()
.antMatchers(HttpMethod.POST, '/dashboardservice/v4/datasource/apple/automation').permitAll()
.antMatchers('/health').permitAll()
.antMatchers('/prometheus').permitAll()
.antMatchers('/info').permitAll()
.antMatchers('/metrics').permitAll()
.anyRequest().authenticated()
http.addFilterBefore(jwtRequestFilter, UsernamePasswordAuthenticationFilter.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class OesPermissionService extends PermissionService{
@Autowired
OesAuthorizationService oesAuthorizationService

static final String defaultGroup = "anonymous"

@Override
void loginWithRoles(String userId, Collection<String> roles) {
if (fiatStatus.isEnabled()) {
Expand All @@ -36,9 +38,15 @@ class OesPermissionService extends PermissionService{
}
if (isOesAuthorizationServiceEnabled){
try {
if (roles == null){
roles = new ArrayList<>()
roles.add(defaultGroup)
} else if (roles.isEmpty()){
roles.add(defaultGroup)
}
oesAuthorizationService.cacheUserGroups(roles, userId)
} catch(Exception e1){
log.error("Exception occured while login with roles : {}", e1)
log.error("Exception occurred while login with roles : {}", e1)
}
}
}
Expand Down
Loading