Skip to content

Commit

Permalink
pr: address issue with subjects across cacerts
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Raines committed Jul 31, 2020
1 parent 5380f0c commit b9b5c54
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions state/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -989,12 +989,13 @@ func (b1 *MTLSAuth) GetID() string {
}

// GetID2 returns the endpoint key of the entity,
// the SubjectName field for MTLSAuth.
// BUT NO SUCH THING EXISTS 😱
// TODO: this is kind of a pointless clone of GetID for MTLSAuth. the mtls-auth
// entity cannot be referenced by anything other than its ID (it has no unique
// fields), but the entity interface requires this function. this duplication
// doesn't appear to be harmful, but it's weird.
func (b1 *MTLSAuth) GetID2() string {
if b1.SubjectName == nil {
return ""
}
return *b1.SubjectName
return (*b1).GetID()
}

func (b1 *MTLSAuth) GetConsumer() string {
Expand Down

0 comments on commit b9b5c54

Please sign in to comment.