Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
21aeed2
categorization feedback
etanb Jan 16, 2025
ff68f08
attempt at downloading pdf as image
etanb Jan 17, 2025
5487898
upgrading to kotlin 2.0 and fixing tests
Jan 7, 2025
4d43e82
Merge remote-tracking branch 'origin/main' into platform/kant/16908-k…
Jan 22, 2025
73cfc70
first pass at PDF creation
etanb Jan 23, 2025
1185b56
merge result page branch
etanb Jan 24, 2025
bfd69c3
beautified PDF
etanb Jan 24, 2025
42c634c
[16141] Database changes for receiver enrichment user story.
wcutshall Jan 28, 2025
598cedf
Trivy gh actions (#17208)
bethbeza Jan 28, 2025
253f770
MessageTesting API filter errors (#17142)
lucero-v Jan 28, 2025
3f50372
Merge branch 'main' into platform/bill/16141-db
wcutshall Jan 28, 2025
2f50045
[16141] Added parameter to support database schema change for receive…
wcutshall Jan 28, 2025
862c825
[16141] Added parameter to support database schema change for receive…
wcutshall Jan 28, 2025
703d2db
stylized PDF download
etanb Jan 29, 2025
649ce75
Fixing unit test as part of kotlin 2.0 upgrade
Jan 29, 2025
e49b834
Revert "MessageTesting API filter errors (#17142)"
victor-chaparro Jan 29, 2025
0503ff3
dont show download PDF on success
etanb Jan 29, 2025
f48d719
Merge pull request #17215 from CDCgov/revert-17142-engagement/lucero/…
victor-chaparro Jan 29, 2025
7fd729b
ktlint format changes
Jan 29, 2025
ef5c170
Merge branch 'main' into platform/kant/16908-kotlin-2.0
kant777 Jan 29, 2025
d22dbe0
Merge branch 'main' into platform/bill/16141-db
arnejduranovic Jan 30, 2025
f4bc463
Merge pull request #17210 from CDCgov/platform/bill/16141-db
wcutshall Jan 30, 2025
1ad6c74
refacting ktlint version across the project and using new signatures …
Jan 30, 2025
dda04a0
Merge branch 'platform/kant/16908-kotlin-2.0' of github.com:CDCgov/pr…
Jan 30, 2025
8766daa
Update prepare_deployment_branch.yaml (#17224)
devopsmatt Jan 30, 2025
bfc544c
componentized and redesigned PDFs
etanb Jan 30, 2025
22ed376
[16141] Implement ReceiverEnrichment Function (#16854)
wcutshall Jan 30, 2025
e15bb89
merge main
etanb Jan 30, 2025
ec66eb8
Merge pull request #17211 from CDCgov/experience/16073/message-testin…
etanb Jan 31, 2025
f9a8262
fixing ktlint issues
Jan 31, 2025
ec6073d
Merge branch 'main' into platform/kant/16908-kotlin-2.0
kant777 Jan 31, 2025
4d5cf00
fixing ktlint issues
Jan 31, 2025
ea76d4a
fixing merge conflict
Jan 31, 2025
5b5badf
fixing ktlint issue
Jan 31, 2025
90921c8
Update 0023-condition-to-code-mapping.md (#17231)
stevewassnava Jan 31, 2025
5b4b65c
Merge branch 'main' into platform/kant/16908-kotlin-2.0
kant777 Feb 2, 2025
27681e2
Merge pull request #17012 from CDCgov/platform/kant/16908-kotlin-2.0
kant777 Feb 3, 2025
eff1cd9
[16141] Amending new folder name. (#17253)
wcutshall Feb 3, 2025
449cffc
Remove unused devops issue template (#17252)
jack-h-wang Feb 3, 2025
133a454
update roadmap
etanb Feb 3, 2025
5aad616
added last updated
etanb Feb 3, 2025
4ee150a
Merge branch 'main' into experience/17137/update-roadmap
etanb Feb 4, 2025
bd863d5
Add wait for status dashboard container visibility for Receiver Statu…
jpandersen87 Feb 4, 2025
95fb71f
Merge branch 'main' into experience/17137/update-roadmap
etanb Feb 4, 2025
fa81059
Merge pull request #17256 from CDCgov/experience/17137/update-roadmap
etanb Feb 4, 2025
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
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/devops_request.md

This file was deleted.

6 changes: 2 additions & 4 deletions .github/workflows/log_management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ jobs:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- name: Workflow Housekeeper - workflows NOT in default branch

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

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

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

env:
GITHUB_TOKEN: ${{ secrets.LOG_MANAGEMENT_TOKEN }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/prepare_deployment_branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,15 @@ jobs:

- name: "Create branch '${{ env.BRANCH_NAME }}' to contain the changes for the deployment on ${{ env.DEPLOYMENT_DATE }}"

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

with:
branch: "${{ env.BRANCH_NAME }}"

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

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

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import org.apache.logging.log4j.kotlin.Logging
import org.springframework.stereotype.Service

@Service
class OktaGroupsClient(
private val applicationGroupsApi: ApplicationGroupsApi,
) : Logging {
class OktaGroupsClient(private val applicationGroupsApi: ApplicationGroupsApi) : Logging {

/**
* Get all application groups from the Okta Admin API
Expand All @@ -18,8 +16,7 @@ class OktaGroupsClient(
*
* @see https://developer.okta.com/docs/api/openapi/okta-management/management/tag/ApplicationGroups/#tag/ApplicationGroups/operation/listApplicationGroupAssignments
*/
suspend fun getApplicationGroups(appId: String): List<String> {
return withContext(Dispatchers.IO) {
suspend fun getApplicationGroups(appId: String): List<String> = withContext(Dispatchers.IO) {
try {
val groups = applicationGroupsApi
.listApplicationGroupAssignments(appId, null, null, null, "group")
Expand All @@ -33,5 +30,4 @@ class OktaGroupsClient(
throw ex
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@ import kotlin.time.TimeSource
* Simple class to automatically read configuration from application.yml (or environment variable overrides)
*/
@ConfigurationProperties(prefix = "app")
data class ApplicationConfig(
val environment: Environment,
) {
data class ApplicationConfig(val environment: Environment) {

@Bean
fun timeSource(): TimeSource {
return TimeSource.Monotonic
}
fun timeSource(): TimeSource = TimeSource.Monotonic

@Bean
fun clock(): Clock {
return Clock.systemUTC()
}
fun clock(): Clock = Clock.systemUTC()
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,20 @@ import org.springframework.context.annotation.Profile

@Configuration
@Profile("!test")
class OktaClientConfig(
private val oktaClientProperties: OktaClientProperties,
) {
class OktaClientConfig(private val oktaClientProperties: OktaClientProperties) {

@Bean
fun apiClient(): ApiClient {
return Clients.builder()
fun apiClient(): ApiClient = Clients.builder()
.setOrgUrl(oktaClientProperties.orgUrl)
.setAuthorizationMode(AuthorizationMode.PRIVATE_KEY)
.setClientId(oktaClientProperties.clientId)
.setScopes(oktaClientProperties.requiredScopes)
.setPrivateKey(oktaClientProperties.apiPrivateKey)
// .setCacheManager(...) TODO: investigate caching since groups don't often change
.build()
}

@Bean
fun applicationGroupsApi(): ApplicationGroupsApi {
return ApplicationGroupsApi(apiClient())
}
fun applicationGroupsApi(): ApplicationGroupsApi = ApplicationGroupsApi(apiClient())

@ConfigurationProperties(prefix = "okta.admin-client")
data class OktaClientProperties(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import org.springframework.security.web.server.SecurityWebFilterChain
*/
@Configuration
@EnableWebFluxSecurity
class SecurityConfig(
private val applicationConfig: ApplicationConfig,
) : Logging {
class SecurityConfig(private val applicationConfig: ApplicationConfig) : Logging {

@Bean
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import org.springframework.web.bind.annotation.RestController
import kotlin.time.TimeSource

@RestController
class HealthController(
timeSource: TimeSource,
) {
class HealthController(timeSource: TimeSource) {

private val applicationStart = timeSource.markNow()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,15 @@ import reactor.core.publisher.Mono
* defined in spring-cloud-gateway and is instantiated via configuration under a route's filters.
*/
@Component
class AppendOktaGroupsGatewayFilterFactory(
private val oktaGroupsService: OktaGroupsService,
) : AbstractGatewayFilterFactory<Any>() {
class AppendOktaGroupsGatewayFilterFactory(private val oktaGroupsService: OktaGroupsService) :
AbstractGatewayFilterFactory<Any>() {

/**
* function used only in testing to create our filter without any configuration
*/
fun apply(): GatewayFilter {
return apply { _: Any? -> }
}
fun apply(): GatewayFilter = apply { _: Any? -> }

override fun apply(config: Any?): GatewayFilter {
return GatewayFilter { exchange, chain ->
override fun apply(config: Any?): GatewayFilter = GatewayFilter { exchange, chain ->
exchange
.getPrincipal<BearerTokenAuthentication>()
.flatMap { oktaAccessTokenJWT ->
Expand Down Expand Up @@ -57,5 +53,4 @@ class AppendOktaGroupsGatewayFilterFactory(
chain.filter(exchange.mutate().request(request).build())
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@ package gov.cdc.prime.reportstream.auth.model
/**
* Simple json response model for application status
*/
data class ApplicationStatus(
val application: String,
val status: String,
val uptime: String,
)
data class ApplicationStatus(val application: String, val status: String, val uptime: String)
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ import java.util.Date
import java.util.UUID

@Service
class OktaGroupsJWTWriter(
private val jwtConfig: OktaGroupsJWTConfig,
private val clock: Clock,
) {
class OktaGroupsJWTWriter(private val jwtConfig: OktaGroupsJWTConfig, private val clock: Clock) {

/**
* generate and sign our custom JWT containing Okta group information for a particular application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ import org.springframework.context.annotation.Profile
class TestOktaClientConfig {

@Bean
fun apiClient(): ApiClient {
return mockk()
}
fun apiClient(): ApiClient = mockk()

@Bean
fun applicationGroupsApi(): ApplicationGroupsApi {
return mockk()
}
fun applicationGroupsApi(): ApplicationGroupsApi = mockk()
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import kotlin.test.Test
@SpringBootTest
@AutoConfigureWebTestClient
@Import(TestOktaClientConfig::class)
class HealthControllerTest @Autowired constructor(
private val webTestClient: WebTestClient,
) {
class HealthControllerTest @Autowired constructor(private val webTestClient: WebTestClient) {

@Test
fun `successful healthcheck`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,14 @@ class AppendOktaGroupsGatewayFilterFactoryTest @Autowired constructor(
) {

@TestConfiguration
class Config(
@Value("\${wiremock.server.port}") val port: Int,
) {
class Config(@Value("\${wiremock.server.port}") val port: Int) {

@Bean
fun oktaGroupsService(): OktaGroupsService {
return mockk()
}
fun oktaGroupsService(): OktaGroupsService = mockk()

@Bean
fun appendOktaGroupsGatewayFilterFactory(): AppendOktaGroupsGatewayFilterFactory {
return AppendOktaGroupsGatewayFilterFactory(oktaGroupsService())
}
fun appendOktaGroupsGatewayFilterFactory():
AppendOktaGroupsGatewayFilterFactory = AppendOktaGroupsGatewayFilterFactory(oktaGroupsService())

@Bean
fun testRouteLocator(builder: RouteLocatorBuilder): RouteLocator {
Expand Down
1 change: 0 additions & 1 deletion buildSrc/shared.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ repositories {
}
maven { url = uri("https://repo.spring.io/snapshot") }
}

Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jlleitschuh.gradle.ktlint.KtlintExtension

apply(from = rootProject.file("buildSrc/shared.gradle.kts"))

plugins {
kotlin("jvm")
id("org.jlleitschuh.gradle.ktlint")
}

ktlint {
version = "1.5.0"
}

group = "gov.cdc.prime.reportstream"
version = "0.0.1-SNAPSHOT"

repositories {
mavenCentral()
}
val jvmTarget = JvmTarget.JVM_17

kotlin {
jvmToolchain(17)
jvmToolchain(jvmTarget.target.toInt())
}

val majorJavaVersion = 17
java {
sourceCompatibility = JavaVersion.toVersion(majorJavaVersion)
targetCompatibility = JavaVersion.toVersion(majorJavaVersion)
sourceCompatibility = JavaVersion.toVersion(jvmTarget.target)
targetCompatibility = JavaVersion.toVersion(jvmTarget.target)
toolchain {
languageVersion = JavaLanguageVersion.of(majorJavaVersion)
languageVersion = JavaLanguageVersion.of(jvmTarget.target)
}
}
val compileKotlin: KotlinCompile by tasks
val compileTestKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions.jvmTarget = "$majorJavaVersion"
compileKotlin.kotlinOptions.allWarningsAsErrors = true
compileTestKotlin.kotlinOptions.jvmTarget = "$majorJavaVersion"
compileTestKotlin.kotlinOptions.allWarningsAsErrors = true

configure<KtlintExtension> {
// See ktlint versions at https://github.com/pinterest/ktlint/releases
version.set("1.1.1")
}
compileKotlin.compilerOptions.jvmTarget.set(jvmTarget)
compileKotlin.compilerOptions.allWarningsAsErrors = true
compileTestKotlin.compilerOptions.jvmTarget.set(jvmTarget)
compileTestKotlin.compilerOptions.allWarningsAsErrors = true

tasks.withType<Test> {
useJUnitPlatform()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ test.describe(
});

test("result message", async ({ adminReceiverStatusPage }) => {
await adminReceiverStatusPage.statusContainer.waitFor({ state: "visible" });

// get first entry's result from all-fail receiver's first day -> third time period
const receiverI = 0;
const dayI = 0;
Expand Down
1 change: 1 addition & 0 deletions frontend-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@microsoft/applicationinsights-web": "^3.3.4",
"@okta/okta-react": "^6.9.0",
"@okta/okta-signin-widget": "^7.27.2",
"@react-pdf/renderer": "^4.1.6",
"@rest-hooks/rest": "^3.0.3",
"@tanstack/react-query": "^5.64.0",
"@tanstack/react-query-devtools": "^5.64.0",
Expand Down
Loading
Loading