From a029c41837901d2dfc88bfdda47db6cd662b39ef Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 7 Feb 2024 15:14:38 +0100 Subject: [PATCH] beps/0003: add TODOs for issuing service tokens Couple of concerns around how service tokens are issued that came up. First one is whether we should require callers to specify which plugin they want to talk to - as this information can be quite valuable to the implementation. Second is how we make it hard to forget to forward credentials, since the existing interface doesn't really do that. Signed-off-by: Patrik Oldsberg --- beps/0003-auth-architecture-evolution/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/beps/0003-auth-architecture-evolution/README.md b/beps/0003-auth-architecture-evolution/README.md index 6c8aa38b0b..e5937aab0d 100644 --- a/beps/0003-auth-architecture-evolution/README.md +++ b/beps/0003-auth-architecture-evolution/README.md @@ -111,6 +111,8 @@ type BackstageCredentials = export interface AuthService { authenticate(token: string): Promise; + // TODO: should the caller provide the target plugin ID? + // TODO: how can we make it very difficult to forget to forward credentials issueToken(credentials: BackstageCredentials): Promise<{ token: string }>; } ```