Skip to content

Commit

Permalink
Upgrade to Panda v7 - support key rotation
Browse files Browse the repository at this point in the history
This upgrades Panda from v5 to v7, allowing us to use key rotation as introduced with
guardian/pan-domain-authentication#150.

See also guardian/pan-domain-authentication#160.
  • Loading branch information
rtyley committed Sep 19, 2024
1 parent 68f8a57 commit 6d93f23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions common/app/http/GuardianAuthWithExemptions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.amazonaws.regions.Regions
import com.amazonaws.services.s3.AmazonS3
import com.gu.pandomainauth.action.AuthActions
import com.gu.pandomainauth.model.AuthenticatedUser
import com.gu.pandomainauth.{PanDomain, PanDomainAuthSettingsRefresher}
import com.gu.pandomainauth.{PanDomain, PanDomainAuthSettingsRefresher, S3BucketLoader}
import com.gu.permissions.{PermissionDefinition, PermissionsConfig, PermissionsProvider}
import common.Environment.stage
import conf.Configuration.aws.mandatoryCredentials
Expand Down Expand Up @@ -54,14 +54,11 @@ class GuardianAuthWithExemptions(
case _ => s"local.dev-gutools.co.uk" // covers DEV, LOCAL, tests etc.
}

override lazy val panDomainSettings =
new PanDomainAuthSettingsRefresher(
domain = toolsDomainSuffix,
system,
bucketName = "pan-domain-auth-settings",
settingsFileKey = s"$toolsDomainSuffix.settings",
s3Client,
)
override lazy val panDomainSettings = PanDomainAuthSettingsRefresher(
domain = toolsDomainSuffix,
system,
S3BucketLoader.forAwsSdkV1(s3Client, "pan-domain-auth-settings"),
)

override def authCallbackUrl = s"https://$toolsDomainPrefix.$toolsDomainSuffix$oauthCallbackPath"

Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ object Dependencies {
val macwire = "com.softwaremill.macwire" %% "macros" % "2.5.9" % "provided"
val mockito = "org.mockito" % "mockito-all" % "1.10.19" % Test
val paClient = "com.gu" %% "pa-client" % "7.0.12"
val panDomainAuth = "com.gu" %% "pan-domain-auth-play_3-0" % "5.0.0"
val panDomainAuth = "com.gu" %% "pan-domain-auth-play_3-0" % "7.0.0"
val editorialPermissions = "com.gu" %% "editorial-permissions-client" % "3.0.0"
val quartzScheduler = "org.quartz-scheduler" % "quartz" % "2.3.2"
val redisClient = "net.debasishg" %% "redisclient" % "3.42"
Expand Down

0 comments on commit 6d93f23

Please sign in to comment.