Skip to content

Commit

Permalink
test profile
Browse files Browse the repository at this point in the history
  • Loading branch information
leoraba committed Jan 11, 2024
1 parent 47f006c commit 9aa1f48
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.util.UriComponentsBuilder;

@Configuration
@Profile("secure")
@Getter
public class KeycloakConfig {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.http.*;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.security.authentication.BadCredentialsException;
Expand All @@ -23,6 +24,7 @@

@Slf4j
@Service
@Profile("secure")
public class KeycloakAuthorizationService {

private final KeycloakConfig keycloakConfig;
Expand Down
32 changes: 18 additions & 14 deletions score-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ auth:
server:
# check API Key endpoint
url: https://localhost:8443/oauth/check_token
tokenName: token
clientID: resource
clientSecret: pass
tokenName: apiToken
clientID: score
clientSecret: scoresecret
# Define a valid auth provider: ego or keycloak
provider: ego
# Keycloak config
Expand All @@ -243,15 +243,15 @@ auth:
realm: "myrealm"
scope:
download:
system: aws.download
system: score.READ
study:
prefix: aws.
suffix: .download
prefix: PROGRAMDATA-
suffix: .READ
upload:
system: aws.upload
system: score.WRITE
study:
prefix: aws.
suffix: .upload
prefix: PROGRAMDATA-
suffix: .WRITE

---

Expand All @@ -266,20 +266,24 @@ spring:

s3:
secured: false
endpoint: localhost:9444/s3
accessKey: AKIAIOSFODNN7EXAMPLE
secretKey: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
endpoint: http://localhost:8085
accessKey: minio
secretKey: minio123

# Server
server:
port: 8087

bucket:
name.object: test.icgc
name.state: test.icgc
name.object: test.icgc.test
name.state: test.icgc.test

upload:
clean.enabled: false

metadata:
url: http://localhost:8080

---

###############################################################################
Expand Down

0 comments on commit 9aa1f48

Please sign in to comment.