Skip to content

Commit f4f22fc

Browse files
committed
stop creating per project pets
1 parent 64829e4 commit f4f22fc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/scala/org/broadinstitute/dsde/workbench/sam/google/GoogleExtensionRoutes.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ trait GoogleExtensionRoutes extends ExtensionRoutes with SamUserDirectives with
7878
getWithTelemetry(samRequestContext, "userEmail" -> email, "googleProject" -> googleProject) {
7979
complete {
8080
import spray.json._
81-
googleExtensions.getPetServiceAccountKey(email, googleProject, samRequestContext) map {
81+
googleExtensions.getArbitraryPetServiceAccountKey(email, samRequestContext) map {
8282
// parse json to ensure it is json and tells akka http the right content-type
8383
case Some(key) => StatusCodes.OK -> key.parseJson
8484
case None =>
@@ -91,7 +91,7 @@ trait GoogleExtensionRoutes extends ExtensionRoutes with SamUserDirectives with
9191
postWithTelemetry(samRequestContext, "userEmail" -> email) {
9292
entity(as[Set[String]]) { scopes =>
9393
complete {
94-
googleExtensions.getPetServiceAccountToken(email, googleProject, scopes, samRequestContext).map {
94+
googleExtensions.getArbitraryPetServiceAccountToken(email, scopes, samRequestContext).map {
9595
case Some(token) => StatusCodes.OK -> JsString(token)
9696
case None =>
9797
throw new WorkbenchExceptionWithErrorReport(ErrorReport(StatusCodes.NotFound, "pet service account not found"))
@@ -144,7 +144,7 @@ trait GoogleExtensionRoutes extends ExtensionRoutes with SamUserDirectives with
144144
import spray.json._
145145
// parse json to ensure it is json and tells akka http the right content-type
146146
googleExtensions
147-
.getPetServiceAccountKey(samUser, GoogleProject(project), samRequestContext)
147+
.getArbitraryPetServiceAccountKey(samUser, samRequestContext)
148148
.map { key =>
149149
StatusCodes.OK -> key.parseJson
150150
}
@@ -173,7 +173,7 @@ trait GoogleExtensionRoutes extends ExtensionRoutes with SamUserDirectives with
173173
entity(as[Set[String]]) { scopes =>
174174
complete {
175175
googleExtensions
176-
.getPetServiceAccountToken(samUser, GoogleProject(project), scopes, samRequestContext)
176+
.getArbitraryPetServiceAccountToken(samUser, scopes, samRequestContext)
177177
.map { token =>
178178
StatusCodes.OK -> JsString(token)
179179
}

0 commit comments

Comments
 (0)