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

Upgrade to Panda v7 - support key rotation #361

Merged
merged 4 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 3 additions & 5 deletions app/AppComponents.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import com.gu.AppIdentity
import com.gu.atom.play.ReindexController
import com.gu.pandomainauth.PanDomainAuthSettingsRefresher
import com.gu.pandomainauth.{PanDomainAuthSettingsRefresher, S3BucketLoader}
import config.{AWS, Config}
import controllers.{AssetsComponents, ExplainerReindexController, PanDomainAuthActions}
import db.{AtomDataStores, AtomWorkshopDB, ExplainerDB}
Expand Down Expand Up @@ -30,12 +30,10 @@ class AppComponents(context: Context, identity: AppIdentity)

override def controllerComponents: ControllerComponents = AppComponents.this.controllerComponents

override def panDomainSettings: PanDomainAuthSettingsRefresher = new PanDomainAuthSettingsRefresher(
override val panDomainSettings: PanDomainAuthSettingsRefresher = PanDomainAuthSettingsRefresher(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

domain = config.pandaDomain,
system = config.pandaSystem,
bucketName = "pan-domain-auth-settings",
settingsFileKey = s"${config.pandaDomain}.settings",
s3Client = AWS.S3Client,
S3BucketLoader.forAwsSdkV1(AWS.S3Client, "pan-domain-auth-settings")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR:

...introduced the new S3BucketLoader abstraction, which simplifies constructing a PanDomainAuthSettingsRefresher and means that Panda is no longer tied to AWS SDK v1 - an alternative AWS SDK v2 implementation of S3BucketLoader could be introduced.

)

override def permissions: Permissions = appPermissions
Expand Down
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ libraryDependencies ++= dependencies

routesGenerator := InjectedRoutesGenerator

resolvers ++= Resolver.sonatypeOssRepos("releases")

lazy val root = (project in file(".")).enablePlugins(PlayScala, JDebPackaging, SystemdPlugin)
.settings(Defaults.coreDefaultSettings: _*)
.settings(
Expand Down
4 changes: 2 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ object Dependencies {
"com.gu" %% "editorial-permissions-client" % "2.15",
"com.gu" %% "simple-configuration-ssm" % "1.5.6",
"com.gu" %% "fezziwig" % "1.6",
"com.gu" %% "pan-domain-auth-play_3-0" % "5.0.0",
"com.gu" %% "pan-domain-auth-play_3-0" % "7.0.0",
"io.circe" %% "circe-parser" % "0.14.5",
"net.logstash.logback" % "logstash-logback-encoder" % "6.6",
"com.gu" %% "content-api-client-aws" % "0.7",
"com.gu" %% "content-api-client" % "20.0.0"
)
}
}