diff --git a/app/AppComponents.scala b/app/AppComponents.scala index ce0b9f53..f9c70c04 100644 --- a/app/AppComponents.scala +++ b/app/AppComponents.scala @@ -1,11 +1,8 @@ -import com.amazonaws.auth.{AWSCredentialsProvider, DefaultAWSCredentialsProviderChain} -import com.gu.pandomainauth.PanDomainAuthSettingsRefresher -import com.gu.permissions.{PermissionsConfig, PermissionsProvider} +import com.gu.pandomainauth.{PanDomainAuthSettingsRefresher, S3BucketLoader} import controllers.AssetsComponents import model.jobs.JobRunner import modules.clustersync.ClusterSynchronisation import modules.sponsorshiplifecycle.SponsorshipLifecycleJobs -import permissions.Permissions import play.api.ApplicationLoader.Context import play.api.BuiltInComponentsFromContext import play.api.libs.ws.ahc.AhcWSComponents @@ -32,12 +29,10 @@ class AppComponents(context: Context, config: Config) new JobRunner(context.lifecycle) new SponsorshipLifecycleJobs(context.lifecycle) - val panDomainSettings = new PanDomainAuthSettingsRefresher( + val panDomainSettings = PanDomainAuthSettingsRefresher( domain = config.pandaDomain, system = config.pandaSystemIdentifier, - bucketName = config.pandaBucketName, - settingsFileKey= config.pandaSettingsFileKey, - s3Client = AWS.S3Client, + S3BucketLoader.forAwsSdkV1(AWS.S3Client, "pan-domain-auth-settings") ) lazy val router: Router = new Routes( diff --git a/build.sbt b/build.sbt index 7b12b893..8f5de0e0 100644 --- a/build.sbt +++ b/build.sbt @@ -18,6 +18,7 @@ scalacOptions ++= Seq( lazy val awsVersion = "1.12.403" +val pandaVersion = "7.0.0" lazy val dependencies = Seq( "com.amazonaws" % "aws-java-sdk-dynamodb" % awsVersion, "com.amazonaws" % "aws-java-sdk-ec2" % awsVersion, @@ -26,7 +27,7 @@ lazy val dependencies = Seq( "com.amazonaws" % "aws-java-sdk-sqs" % awsVersion, "com.amazonaws" % "aws-java-sdk-sts" % awsVersion, "com.amazonaws" % "amazon-kinesis-client" % "1.14.10", - "com.gu" %% "pan-domain-auth-play_2-8" % "4.0.0", + "com.gu" %% "pan-domain-auth-play_2-8" % pandaVersion, "com.gu" %% "editorial-permissions-client" % "2.15", ws, // for panda "ai.x" %% "play-json-extensions" % "0.42.0", @@ -37,7 +38,7 @@ lazy val dependencies = Seq( "net.logstash.logback" % "logstash-logback-encoder" % "7.2", "org.slf4j" % "slf4j-api" % "1.7.12", "org.slf4j" % "jcl-over-slf4j" % "1.7.12", - "com.gu" %% "panda-hmac-play_2-8" % "4.0.0", + "com.gu" %% "panda-hmac-play_2-8" % pandaVersion, "com.gu" %% "content-api-client-aws" % "0.7.4", "com.beachape" %% "enumeratum" % "1.5.13", "org.scalatest" %% "scalatest" % "3.2.19" % Test,