Skip to content

Commit f42c280

Browse files
authored
Merge pull request #17272 from CDCgov/deployment/2025-02-05
Deployment of 2025-02-05
2 parents d5ab874 + f3f7ca3 commit f42c280

File tree

291 files changed

+3381
-2874
lines changed

Some content is hidden

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

291 files changed

+3381
-2874
lines changed

.github/ISSUE_TEMPLATE/devops_request.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/log_management.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ jobs:
1313
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
1414
- name: Workflow Housekeeper - workflows NOT in default branch
1515

16-
uses: JosiahSiegel/workflow-housekeeper@731cc20bb613208b34efb6ac74aab4ba147abb50
17-
## DevSecOps - Aquia (Replace) - uses: ./.github/actions/workflow-housekeeper
16+
uses: ./.github/actions/workflow-housekeeper
1817

1918
env:
2019
GITHUB_TOKEN: ${{ secrets.LOG_MANAGEMENT_TOKEN }}
@@ -25,8 +24,7 @@ jobs:
2524
dry-run: false
2625
- name: Workflow Housekeeper - workflows in default branch
2726

28-
uses: JosiahSiegel/workflow-housekeeper@731cc20bb613208b34efb6ac74aab4ba147abb50
29-
## DevSecOps - Aquia (Replace) - uses: ./.github/actions/workflow-housekeeper
27+
uses: ./.github/actions/workflow-housekeeper
3028

3129
env:
3230
GITHUB_TOKEN: ${{ secrets.LOG_MANAGEMENT_TOKEN }}

.github/workflows/prepare_deployment_branch.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,15 @@ jobs:
2828
2929
- name: "Create branch '${{ env.BRANCH_NAME }}' to contain the changes for the deployment on ${{ env.DEPLOYMENT_DATE }}"
3030

31-
uses: JosiahSiegel/remote-branch-action@dbe7a2138eb064fbfdb980abee918091a7501fbe
32-
## DevSecOps - Aquia (Replace) - uses: ./.github/actions/remote-branch-action
31+
uses: ./.github/actions/remote-branch
3332

3433
with:
3534
branch: "${{ env.BRANCH_NAME }}"
3635

3736
- name: "Prepare a Pull Request from ${{ env.BRANCH_NAME }} into production branch"
3837
id: pr
3938

40-
uses: JosiahSiegel/reliable-pull-request-action@ae8d0c88126329ee363a35392793d0bc94cb82e7
41-
## DevSecOps - Aquia (Replace) - uses: ./.github/actions/reliable-pull-request-action
39+
uses: ./.github/actions/reliable-pull-request
4240

4341
env:
4442
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

auth/src/main/kotlin/gov/cdc/prime/reportstream/auth/client/OktaGroupsClient.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ import org.apache.logging.log4j.kotlin.Logging
77
import org.springframework.stereotype.Service
88

99
@Service
10-
class OktaGroupsClient(
11-
private val applicationGroupsApi: ApplicationGroupsApi,
12-
) : Logging {
10+
class OktaGroupsClient(private val applicationGroupsApi: ApplicationGroupsApi) : Logging {
1311

1412
/**
1513
* Get all application groups from the Okta Admin API
@@ -18,8 +16,7 @@ class OktaGroupsClient(
1816
*
1917
* @see https://developer.okta.com/docs/api/openapi/okta-management/management/tag/ApplicationGroups/#tag/ApplicationGroups/operation/listApplicationGroupAssignments
2018
*/
21-
suspend fun getApplicationGroups(appId: String): List<String> {
22-
return withContext(Dispatchers.IO) {
19+
suspend fun getApplicationGroups(appId: String): List<String> = withContext(Dispatchers.IO) {
2320
try {
2421
val groups = applicationGroupsApi
2522
.listApplicationGroupAssignments(appId, null, null, null, "group")
@@ -33,5 +30,4 @@ class OktaGroupsClient(
3330
throw ex
3431
}
3532
}
36-
}
3733
}

auth/src/main/kotlin/gov/cdc/prime/reportstream/auth/config/ApplicationConfig.kt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,11 @@ import kotlin.time.TimeSource
1010
* Simple class to automatically read configuration from application.yml (or environment variable overrides)
1111
*/
1212
@ConfigurationProperties(prefix = "app")
13-
data class ApplicationConfig(
14-
val environment: Environment,
15-
) {
13+
data class ApplicationConfig(val environment: Environment) {
1614

1715
@Bean
18-
fun timeSource(): TimeSource {
19-
return TimeSource.Monotonic
20-
}
16+
fun timeSource(): TimeSource = TimeSource.Monotonic
2117

2218
@Bean
23-
fun clock(): Clock {
24-
return Clock.systemUTC()
25-
}
19+
fun clock(): Clock = Clock.systemUTC()
2620
}

auth/src/main/kotlin/gov/cdc/prime/reportstream/auth/config/OktaClientConfig.kt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,20 @@ import org.springframework.context.annotation.Profile
1212

1313
@Configuration
1414
@Profile("!test")
15-
class OktaClientConfig(
16-
private val oktaClientProperties: OktaClientProperties,
17-
) {
15+
class OktaClientConfig(private val oktaClientProperties: OktaClientProperties) {
1816

1917
@Bean
20-
fun apiClient(): ApiClient {
21-
return Clients.builder()
18+
fun apiClient(): ApiClient = Clients.builder()
2219
.setOrgUrl(oktaClientProperties.orgUrl)
2320
.setAuthorizationMode(AuthorizationMode.PRIVATE_KEY)
2421
.setClientId(oktaClientProperties.clientId)
2522
.setScopes(oktaClientProperties.requiredScopes)
2623
.setPrivateKey(oktaClientProperties.apiPrivateKey)
2724
// .setCacheManager(...) TODO: investigate caching since groups don't often change
2825
.build()
29-
}
3026

3127
@Bean
32-
fun applicationGroupsApi(): ApplicationGroupsApi {
33-
return ApplicationGroupsApi(apiClient())
34-
}
28+
fun applicationGroupsApi(): ApplicationGroupsApi = ApplicationGroupsApi(apiClient())
3529

3630
@ConfigurationProperties(prefix = "okta.admin-client")
3731
data class OktaClientProperties(

auth/src/main/kotlin/gov/cdc/prime/reportstream/auth/config/SecurityConfig.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ import org.springframework.security.web.server.SecurityWebFilterChain
1616
*/
1717
@Configuration
1818
@EnableWebFluxSecurity
19-
class SecurityConfig(
20-
private val applicationConfig: ApplicationConfig,
21-
) : Logging {
19+
class SecurityConfig(private val applicationConfig: ApplicationConfig) : Logging {
2220

2321
@Bean
2422
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {

auth/src/main/kotlin/gov/cdc/prime/reportstream/auth/controller/HealthController.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import org.springframework.web.bind.annotation.RestController
88
import kotlin.time.TimeSource
99

1010
@RestController
11-
class HealthController(
12-
timeSource: TimeSource,
13-
) {
11+
class HealthController(timeSource: TimeSource) {
1412

1513
private val applicationStart = timeSource.markNow()
1614

auth/src/main/kotlin/gov/cdc/prime/reportstream/auth/filter/AppendOktaGroupsGatewayFilterFactory.kt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,15 @@ import reactor.core.publisher.Mono
1515
* defined in spring-cloud-gateway and is instantiated via configuration under a route's filters.
1616
*/
1717
@Component
18-
class AppendOktaGroupsGatewayFilterFactory(
19-
private val oktaGroupsService: OktaGroupsService,
20-
) : AbstractGatewayFilterFactory<Any>() {
18+
class AppendOktaGroupsGatewayFilterFactory(private val oktaGroupsService: OktaGroupsService) :
19+
AbstractGatewayFilterFactory<Any>() {
2120

2221
/**
2322
* function used only in testing to create our filter without any configuration
2423
*/
25-
fun apply(): GatewayFilter {
26-
return apply { _: Any? -> }
27-
}
24+
fun apply(): GatewayFilter = apply { _: Any? -> }
2825

29-
override fun apply(config: Any?): GatewayFilter {
30-
return GatewayFilter { exchange, chain ->
26+
override fun apply(config: Any?): GatewayFilter = GatewayFilter { exchange, chain ->
3127
exchange
3228
.getPrincipal<BearerTokenAuthentication>()
3329
.flatMap { oktaAccessTokenJWT ->
@@ -57,5 +53,4 @@ class AppendOktaGroupsGatewayFilterFactory(
5753
chain.filter(exchange.mutate().request(request).build())
5854
}
5955
}
60-
}
6156
}

auth/src/main/kotlin/gov/cdc/prime/reportstream/auth/model/ApplicationStatus.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,4 @@ package gov.cdc.prime.reportstream.auth.model
33
/**
44
* Simple json response model for application status
55
*/
6-
data class ApplicationStatus(
7-
val application: String,
8-
val status: String,
9-
val uptime: String,
10-
)
6+
data class ApplicationStatus(val application: String, val status: String, val uptime: String)

0 commit comments

Comments
 (0)