mirror of
https://github.com/openziti/ziti.git
synced 2026-10-13 07:41:17 +00:00
Merge pull request #973 from openziti/add.authenticator.ids.to.identity
adds ids to identity authenticator detail
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -3423,9 +3423,13 @@ definitions:
|
||||
properties:
|
||||
fingerprint:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
updb:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
identityDetail:
|
||||
|
||||
@@ -13937,9 +13937,13 @@ definitions:
|
||||
properties:
|
||||
fingerprint:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
updb:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
identityCreate:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user