Documentation ¶
Overview ¶
Access Control List https://github.com/openconnectivityfoundation/security/blob/master/swagger2.0/oic.sec.acl2.swagger.json
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllResources = []Resource{Resource{ Interfaces: []string{"*"}, Wildcard: ResourceWildcard_NONCFG_ALL, }}
View Source
var TLSConnection = Subject{ Subject_Connection: &Subject_Connection{ Type: ConnectionType_AUTH_CRYPT, }, }
Functions ¶
This section is empty.
Types ¶
type AccessControl ¶
type AccessControl struct { ID int `json:"id,omitempty"` Permission Permission `json:"permission"` Resources []Resource `json:"resources"` Subject Subject `json:"subject"` Validity []TimePattern `json:"validity,omitempty"` }
type ConnectionType ¶
type ConnectionType string
const ( // authenticated encrypted connection ConnectionType_AUTH_CRYPT ConnectionType = "auth-crypt" // anonymous clear-text connection ConnectionType_ANON_CLEAR ConnectionType = "anon-clear" )
type Permission ¶
type Permission int
const ( Permission_CREATE Permission = 1 Permission_READ Permission = 2 Permission_WRITE Permission = 4 Permission_DELETE Permission = 8 Permission_NOTIFY Permission = 16 AllPermissions = Permission_CREATE | Permission_READ | Permission_WRITE | Permission_DELETE | Permission_NOTIFY )
func (Permission) Has ¶
func (b Permission) Has(flag Permission) bool
Has returns true if the flag is set.
func (Permission) String ¶
func (s Permission) String() string
type Resource ¶
type Resource struct { Href string `json:"href,omitempty"` Interfaces []string `json:"if,omitempty"` ResourceTypes []string `json:"rt,omitempty"` Wildcard ResourceWildcard `json:"wc,omitempty"` }
type ResourceWildcard ¶
type ResourceWildcard string
const ( ResourceWildcard_NONCFG_SEC_ENDPOINT ResourceWildcard = "+" ResourceWildcard_NONCFG_NONSEC_ENDPOINT ResourceWildcard = "-" ResourceWildcard_NONCFG_ALL ResourceWildcard = "*" )
type Response ¶
type Response struct { ResourceOwner string `json:"rowneruuid"` Interfaces []string `json:"if"` ResourceTypes []string `json:"rt"` Name string `json:"n"` AccessControlList []AccessControl `json:"aclist2"` }
type Subject ¶
type Subject struct { *Subject_Device *Subject_Role *Subject_Connection }
anyof/oneof
type Subject_Connection ¶
type Subject_Connection struct {
Type ConnectionType `json:"conntype,omitempty"`
}
type Subject_Device ¶
type Subject_Device struct {
DeviceID string `json:"uuid,omitempty"`
}
type Subject_Role ¶
type TimePattern ¶
type UpdateRequest ¶
type UpdateRequest struct { ResourceOwner string `json:"rowneruuid,omitempty"` AccessControlList []AccessControl `json:"aclist2"` }
Click to show internal directories.
Click to hide internal directories.