diff --git a/filesystems/blob/src/main/scala/cromwell/filesystems/blob/BlobPathBuilderFactory.scala b/filesystems/blob/src/main/scala/cromwell/filesystems/blob/BlobPathBuilderFactory.scala index cea7269522a..b12abf5cc34 100644 --- a/filesystems/blob/src/main/scala/cromwell/filesystems/blob/BlobPathBuilderFactory.scala +++ b/filesystems/blob/src/main/scala/cromwell/filesystems/blob/BlobPathBuilderFactory.scala @@ -20,14 +20,13 @@ import scala.jdk.CollectionConverters._ final case class BlobFileSystemConfig(config: Config) final case class BlobPathBuilderFactory(globalConfig: Config, instanceConfig: Config, singletonConfig: BlobFileSystemConfig) extends PathBuilderFactory { - val sasToken: String = instanceConfig.as[String]("sas-token") val container: String = instanceConfig.as[String]("store") val endpoint: String = instanceConfig.as[String]("endpoint") - val workspaceId: String = instanceConfig.as[String]("workspace-id") - val workspaceManagerURL: String = singletonConfig.config.as[String]("workspace-manager-url") + val workspaceId: Option[String] = instanceConfig.as[Option[String]]("workspace-id") + val workspaceManagerURL: Option[String] = singletonConfig.config.as[Option[String]]("workspace-manager-url") val blobTokenGenerator: BlobTokenGenerator = BlobTokenGenerator.createBlobTokenGenerator( - container, endpoint, Option(workspaceId), Option(workspaceManagerURL)) + container, endpoint, workspaceId, workspaceManagerURL) override def withOptions(options: WorkflowOptions)(implicit as: ActorSystem, ec: ExecutionContext): Future[BlobPathBuilder] = { Future { diff --git a/filesystems/blob/src/test/scala/cromwell/filesystems/blob/BlobPathBuilderFactorySpec.scala b/filesystems/blob/src/test/scala/cromwell/filesystems/blob/BlobPathBuilderFactorySpec.scala index 8c9b2345c69..08efd534056 100644 --- a/filesystems/blob/src/test/scala/cromwell/filesystems/blob/BlobPathBuilderFactorySpec.scala +++ b/filesystems/blob/src/test/scala/cromwell/filesystems/blob/BlobPathBuilderFactorySpec.scala @@ -9,12 +9,10 @@ class BlobPathBuilderFactorySpec extends AnyFlatSpec with Matchers { it should "parse configs for a functioning factory" in { val endpoint = BlobPathBuilderSpec.buildEndpoint("coaexternalstorage") val store = "inputs" - val sasToken = "{SAS TOKEN HERE}" val workspaceId = "mockWorkspaceId" val workspaceManagerURL = "https://test.ws.org" val instanceConfig = ConfigFactory.parseString( s""" - |sas-token = "$sasToken" |store = "$store" |endpoint = "$endpoint" |workspace-id = "$workspaceId" @@ -24,8 +22,7 @@ class BlobPathBuilderFactorySpec extends AnyFlatSpec with Matchers { val factory = BlobPathBuilderFactory(globalConfig, instanceConfig, new BlobFileSystemConfig(singletonConfig)) factory.container should equal(store) factory.endpoint should equal(endpoint) - factory.sasToken should equal(sasToken) - factory.workspaceId should equal(workspaceId) - factory.workspaceManagerURL should equal(workspaceManagerURL) + factory.workspaceId should equal(Some(workspaceId)) + factory.workspaceManagerURL should equal(Some(workspaceManagerURL)) } }