Should not use basic type string as key in context.withvalue

should not use basic type string as key in context.WithValue

Just use a key type:

type key int

const (
    keyPrincipalID key = iota
    // ...
)

Since you’ve defined a separate type, it will never collide. Even if you have two packages, pkg1.key(0) != pkg2.key(0).