mirror of
https://github.com/openziti/ziti.git
synced 2026-10-15 16:41:12 +00:00
Merge pull request #714 from openziti/allow-searching-on-role-attributes
Allow searching on role sets
This commit is contained in:
@@ -125,8 +125,8 @@ func (store *edgeRouterPolicyStoreImpl) initializeLocal() {
|
||||
|
||||
store.indexName = store.addUniqueNameField()
|
||||
store.symbolSemantic = store.AddSymbol(FieldSemantic, ast.NodeTypeString)
|
||||
store.symbolIdentityRoles = store.AddSetSymbol(FieldIdentityRoles, ast.NodeTypeString)
|
||||
store.symbolEdgeRouterRoles = store.AddSetSymbol(FieldEdgeRouterRoles, ast.NodeTypeString)
|
||||
store.symbolIdentityRoles = store.AddPublicSetSymbol(FieldIdentityRoles, ast.NodeTypeString)
|
||||
store.symbolEdgeRouterRoles = store.AddPublicSetSymbol(FieldEdgeRouterRoles, ast.NodeTypeString)
|
||||
store.symbolIdentities = store.AddFkSetSymbol(EntityTypeIdentities, store.stores.identity)
|
||||
store.symbolEdgeRouters = store.AddFkSetSymbol(db.EntityTypeRouters, store.stores.edgeRouter)
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ func (store *edgeRouterStoreImpl) GetRoleAttributesIndex() boltz.SetReadIndex {
|
||||
func (store *edgeRouterStoreImpl) initializeLocal() {
|
||||
store.GetParentStore().GrantSymbols(store)
|
||||
|
||||
store.symbolRoleAttributes = store.AddSetSymbol(FieldRoleAttributes, ast.NodeTypeString)
|
||||
store.symbolRoleAttributes = store.AddPublicSetSymbol(FieldRoleAttributes, ast.NodeTypeString)
|
||||
|
||||
store.indexName = store.GetParentStore().(db.RouterStore).GetNameIndex()
|
||||
store.indexRoleAttributes = store.AddSetIndex(store.symbolRoleAttributes)
|
||||
|
||||
@@ -132,7 +132,7 @@ func (store *edgeServiceStoreImpl) GetRoleAttributesIndex() boltz.SetReadIndex {
|
||||
func (store *edgeServiceStoreImpl) initializeLocal() {
|
||||
store.GetParentStore().GrantSymbols(store)
|
||||
|
||||
store.symbolRoleAttributes = store.AddSetSymbol(FieldRoleAttributes, ast.NodeTypeString)
|
||||
store.symbolRoleAttributes = store.AddPublicSetSymbol(FieldRoleAttributes, ast.NodeTypeString)
|
||||
|
||||
store.indexName = store.GetParentStore().(db.ServiceStore).GetNameIndex()
|
||||
store.indexRoleAttributes = store.AddSetIndex(store.symbolRoleAttributes)
|
||||
|
||||
@@ -281,7 +281,7 @@ func (store *identityStoreImpl) GetRoleAttributesIndex() boltz.SetReadIndex {
|
||||
func (store *identityStoreImpl) initializeLocal() {
|
||||
store.AddExtEntitySymbols()
|
||||
|
||||
store.symbolRoleAttributes = store.AddSetSymbol(FieldRoleAttributes, ast.NodeTypeString)
|
||||
store.symbolRoleAttributes = store.AddPublicSetSymbol(FieldRoleAttributes, ast.NodeTypeString)
|
||||
store.indexRoleAttributes = store.AddSetIndex(store.symbolRoleAttributes)
|
||||
|
||||
store.indexName = store.addUniqueNameField()
|
||||
|
||||
@@ -125,8 +125,8 @@ func (store *serviceEdgeRouterPolicyStoreImpl) initializeLocal() {
|
||||
|
||||
store.indexName = store.addUniqueNameField()
|
||||
store.symbolSemantic = store.AddSymbol(FieldSemantic, ast.NodeTypeString)
|
||||
store.symbolServiceRoles = store.AddSetSymbol(FieldServiceRoles, ast.NodeTypeString)
|
||||
store.symbolEdgeRouterRoles = store.AddSetSymbol(FieldEdgeRouterRoles, ast.NodeTypeString)
|
||||
store.symbolServiceRoles = store.AddPublicSetSymbol(FieldServiceRoles, ast.NodeTypeString)
|
||||
store.symbolEdgeRouterRoles = store.AddPublicSetSymbol(FieldEdgeRouterRoles, ast.NodeTypeString)
|
||||
store.symbolServices = store.AddFkSetSymbol(db.EntityTypeServices, store.stores.edgeService)
|
||||
store.symbolEdgeRouters = store.AddFkSetSymbol(db.EntityTypeRouters, store.stores.edgeRouter)
|
||||
}
|
||||
|
||||
@@ -195,9 +195,9 @@ func (store *servicePolicyStoreImpl) initializeLocal() {
|
||||
store.symbolPolicyType = store.AddSymbol(FieldServicePolicyType, ast.NodeTypeInt64)
|
||||
store.symbolSemantic = store.AddSymbol(FieldSemantic, ast.NodeTypeString)
|
||||
|
||||
store.symbolIdentityRoles = store.AddSetSymbol(FieldIdentityRoles, ast.NodeTypeString)
|
||||
store.symbolServiceRoles = store.AddSetSymbol(FieldServiceRoles, ast.NodeTypeString)
|
||||
store.symbolPostureCheckRoles = store.AddSetSymbol(FieldPostureCheckRoles, ast.NodeTypeString)
|
||||
store.symbolIdentityRoles = store.AddPublicSetSymbol(FieldIdentityRoles, ast.NodeTypeString)
|
||||
store.symbolServiceRoles = store.AddPublicSetSymbol(FieldServiceRoles, ast.NodeTypeString)
|
||||
store.symbolPostureCheckRoles = store.AddPublicSetSymbol(FieldPostureCheckRoles, ast.NodeTypeString)
|
||||
|
||||
store.symbolIdentities = store.AddFkSetSymbol(EntityTypeIdentities, store.stores.identity)
|
||||
store.symbolServices = store.AddFkSetSymbol(db.EntityTypeServices, store.stores.edgeService)
|
||||
|
||||
@@ -40,7 +40,7 @@ require (
|
||||
github.com/miekg/dns v1.1.43
|
||||
github.com/mitchellh/mapstructure v1.4.1
|
||||
github.com/netfoundry/secretstream v0.1.2
|
||||
github.com/openziti/fabric v0.16.74
|
||||
github.com/openziti/fabric v0.16.75
|
||||
github.com/openziti/foundation v0.15.60
|
||||
github.com/openziti/sdk-golang v0.15.65
|
||||
github.com/orcaman/concurrent-map v0.0.0-20210106121528-16402b402231
|
||||
|
||||
@@ -574,9 +574,8 @@ github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTm
|
||||
github.com/openziti/bbolt v1.3.6-0.20210317142109-547da822475e h1:ST9+54UtCr96S5+Wa7LQtpGS6/xK7Z+KQXvOAtYgJlA=
|
||||
github.com/openziti/bbolt v1.3.6-0.20210317142109-547da822475e/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
||||
github.com/openziti/dilithium v0.3.3/go.mod h1:vsCjI2AU/hon9e+dLhUFbCNGesJDj2ASgkySOcpmvjo=
|
||||
github.com/openziti/fabric v0.16.74 h1:1VWufwWJA7Nmyprgfi2Ktz5d5RhxXM4NafPd+6cBnHA=
|
||||
github.com/openziti/fabric v0.16.74/go.mod h1:TXv9saO+9p2QCHjT12Va1HLMTfWPDpMYs9eE8BRqVUA=
|
||||
github.com/openziti/foundation v0.15.59/go.mod h1:T6AFkhKlyuH+zsM5AChqoxl45cBswx70mw288eVy4lY=
|
||||
github.com/openziti/fabric v0.16.75 h1:v3qgM/APGBqAMwk5Y7+Xv18iqlAVtIoOjWH6eAxAN2A=
|
||||
github.com/openziti/fabric v0.16.75/go.mod h1:/YJY1j2RTx2gMBL7oQG06BQk5eD8QfN0SimbKjFKvRI=
|
||||
github.com/openziti/foundation v0.15.60 h1:RkVyq0H0w+G2mA5+20xoodULNwn67QQPYDPzyMqpf6M=
|
||||
github.com/openziti/foundation v0.15.60/go.mod h1:T6AFkhKlyuH+zsM5AChqoxl45cBswx70mw288eVy4lY=
|
||||
github.com/openziti/sdk-golang v0.15.65 h1:GleTldLmKrafDX36hZNIqP+VORUiHx+HUZgKWtgKN4o=
|
||||
|
||||
@@ -210,7 +210,6 @@ func (self *edgeXgressConn) close(notify bool, reason string) {
|
||||
|
||||
if self.onClose != nil {
|
||||
self.onClose()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -409,26 +409,6 @@ func (self *edgeClientConn) sendStateClosedReply(message string, req *channel2.M
|
||||
}
|
||||
}
|
||||
|
||||
func (self *edgeClientConn) sendStateClosed(connId uint32, message string) {
|
||||
msg := edge.NewStateClosedMsg(connId, message)
|
||||
pfxlog.Logger().WithFields(edge.GetLoggerFields(msg)).Debug("sending state closed message")
|
||||
|
||||
syncC, err := self.ch.SendAndSyncWithPriority(msg, channel2.High)
|
||||
if err != nil {
|
||||
pfxlog.Logger().WithFields(edge.GetLoggerFields(msg)).WithError(err).Error("failed to send state response")
|
||||
return
|
||||
}
|
||||
|
||||
select {
|
||||
case err = <-syncC:
|
||||
if err != nil {
|
||||
pfxlog.Logger().WithFields(edge.GetLoggerFields(msg)).WithError(err).Error("failed to send state response")
|
||||
}
|
||||
case <-time.After(time.Second * 5):
|
||||
pfxlog.Logger().WithFields(edge.GetLoggerFields(msg)).WithError(err).Error("timed out sending state response")
|
||||
}
|
||||
}
|
||||
|
||||
func getResultOrFailure(msg *channel2.Message, err error, result channel2.TypedMessage) error {
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user