Merge pull request #973 from openziti/add.authenticator.ids.to.identity

adds ids to identity authenticator detail
This commit is contained in:
Andrew
2022-04-14 10:49:57 -04:00
committed by GitHub
8 changed files with 58 additions and 0 deletions
@@ -298,12 +298,14 @@ func MapIdentityToRestModel(ae *env.AppEnv, identity *model.Identity) (*rest_mod
if err = ae.GetHandlers().Identity.CollectAuthenticators(identity.Id, func(entity *model.Authenticator) error {
if entity.Method == persistence.MethodAuthenticatorUpdb {
ret.Authenticators.Updb = &rest_model.IdentityAuthenticatorsUpdb{
ID: entity.Id,
Username: entity.ToUpdb().Username,
}
}
if entity.Method == persistence.MethodAuthenticatorCert {
ret.Authenticators.Cert = &rest_model.IdentityAuthenticatorsCert{
ID: entity.Id,
Fingerprint: entity.ToCert().Fingerprint,
}
}
+18
View File
@@ -4719,12 +4719,18 @@ func init() {
"properties": {
"fingerprint": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"updb": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"username": {
"type": "string"
}
@@ -9705,12 +9711,18 @@ func init() {
"properties": {
"fingerprint": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"IdentityAuthenticatorsUpdb": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"username": {
"type": "string"
}
@@ -10701,12 +10713,18 @@ func init() {
"properties": {
"fingerprint": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"updb": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"username": {
"type": "string"
}
@@ -19329,12 +19329,18 @@ func init() {
"properties": {
"fingerprint": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"updb": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"username": {
"type": "string"
}
@@ -39551,12 +39557,18 @@ func init() {
"properties": {
"fingerprint": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"IdentityAuthenticatorsUpdb": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"username": {
"type": "string"
}
@@ -42175,12 +42187,18 @@ func init() {
"properties": {
"fingerprint": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"updb": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"username": {
"type": "string"
}
+6
View File
@@ -180,6 +180,9 @@ type IdentityAuthenticatorsCert struct {
// fingerprint
Fingerprint string `json:"fingerprint,omitempty"`
// id
ID string `json:"id,omitempty"`
}
// Validate validates this identity authenticators cert
@@ -215,6 +218,9 @@ func (m *IdentityAuthenticatorsCert) UnmarshalBinary(b []byte) error {
// swagger:model IdentityAuthenticatorsUpdb
type IdentityAuthenticatorsUpdb struct {
// id
ID string `json:"id,omitempty"`
// username
Username string `json:"username,omitempty"`
}
+4
View File
@@ -3423,9 +3423,13 @@ definitions:
properties:
fingerprint:
type: string
id:
type: string
updb:
type: object
properties:
id:
type: string
username:
type: string
identityDetail:
+4
View File
@@ -13937,9 +13937,13 @@ definitions:
properties:
fingerprint:
type: string
id:
type: string
updb:
type: object
properties:
id:
type: string
username:
type: string
identityCreate:
+4
View File
@@ -88,12 +88,16 @@ definitions:
properties:
updb:
properties:
id:
type: string
username:
type: string
type: object
cert:
type: object
properties:
id:
type: string
fingerprint:
type: string
identityEnrollments:
+2
View File
@@ -40,6 +40,8 @@ func Test_TransitRouters(t *testing.T) {
t.Run("transit routers can be created, enrolled, and started", func(t *testing.T) {
ctx.testContextChanged(t)
ctx.createEnrollAndStartTransitRouter()
ctx.Req.NoError(ctx.router.Shutdown())
})
t.Run("transit routers can be created, enrolled, and listed", func(t *testing.T) {