Documentation ¶
Index ¶
- func CreateOrUpdateRole(r *RoleReconciler, role *securityv1alpha1.Role, jsonRole []byte) error
- func CreateOrUpdateUser(r *UserReconciler, user *securityv1alpha1.User, jsonUser []byte) error
- func CreateRoleMapping(role *v1alpha1.Role) error
- func CreateTenant(role *securityv1alpha1.Role) error
- func DeleteTenant(tenant string) error
- func GetExistingObject(path, ID string) (bool, []byte, error)
- func GetResponseObjectID(responseBody []byte) string
- func GetResponseStatus(response *http.Response) string
- func MakeAPIRequest(method string, path string, jsonBody []byte) (ObjectID string, Status string, ResponseBody []byte, Error error)
- func MapAPIRoleMappingObject(role *v1alpha1.Role) *rolemappings.RoleMappingAPISpec
- func MapAlertAPIObject(alert *securityv1alpha1.Alert) (*alerts.AlertAPISpec, error)
- func MapRoleAPIObject(role *securityv1alpha1.Role) (*roles.RoleAPISpec, error)
- func MapUserAPIObject(user *securityv1alpha1.User) (*users.UserAPISpec, error)
- func SanitizeQuery(query json.RawMessage) json.RawMessage
- func SetAlertStatus(r *AlertReconciler, alert *securityv1alpha1.Alert, responseResult string, ...) error
- func SetRoleStatus(r *RoleReconciler, role *securityv1alpha1.Role, responseResult string, ...) error
- func SetUserStatus(r *UserReconciler, user *securityv1alpha1.User, responseResult string, ...) error
- func UpdateRoleMapping(name string, jsonRoleMapping []byte) error
- type AlertReconciler
- type RoleReconciler
- type UserReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateRole ¶
func CreateOrUpdateRole(r *RoleReconciler, role *securityv1alpha1.Role, jsonRole []byte) error
CreateOrUpdateRole - make PUT request to create or update Role
func CreateOrUpdateUser ¶
func CreateOrUpdateUser(r *UserReconciler, user *securityv1alpha1.User, jsonUser []byte) error
CreateOrUpdateUser - make PUT request to create or update User
func CreateRoleMapping ¶
CreateRoleMapping - create/update RoleMapping object, based on passed role
func CreateTenant ¶
func CreateTenant(role *securityv1alpha1.Role) error
CreateTenant - make PUT request to create or update Tenant
func DeleteTenant ¶
DeleteTenant - make DELETE request to delete tenant
func GetExistingObject ¶
GetExistingObject - make GET request to get existing elsticsearch object
func GetResponseObjectID ¶
GetResponseObjectID - get object ID, if exists
func GetResponseStatus ¶
GetResponseStatus - return Error or Deployed based on http status code
func MakeAPIRequest ¶
func MakeAPIRequest(method string, path string, jsonBody []byte) (ObjectID string, Status string, ResponseBody []byte, Error error)
MakeAPIRequest - make request to endpoint
func MapAPIRoleMappingObject ¶
func MapAPIRoleMappingObject(role *v1alpha1.Role) *rolemappings.RoleMappingAPISpec
MapAPIRoleMappingObject - map passed role's RoleMapping field to roleMappings API
func MapAlertAPIObject ¶
func MapAlertAPIObject(alert *securityv1alpha1.Alert) (*alerts.AlertAPISpec, error)
MapAlertAPIObject - map CRD model to API
func MapRoleAPIObject ¶
func MapRoleAPIObject(role *securityv1alpha1.Role) (*roles.RoleAPISpec, error)
MapRoleAPIObject - map CRD model to API
func MapUserAPIObject ¶
func MapUserAPIObject(user *securityv1alpha1.User) (*users.UserAPISpec, error)
MapUserAPIObject - map CRD model to API
func SanitizeQuery ¶
func SanitizeQuery(query json.RawMessage) json.RawMessage
SanitizeQuery - parse RawMessage to delete escape characters
func SetAlertStatus ¶
func SetAlertStatus(r *AlertReconciler, alert *securityv1alpha1.Alert, responseResult string, responseBody []byte, alertID string) error
SetAlertStatus set status
func SetRoleStatus ¶
func SetRoleStatus(r *RoleReconciler, role *securityv1alpha1.Role, responseResult string, responseBody []byte) error
SetRoleStatus - parse http response code, set status and update CR
func SetUserStatus ¶
func SetUserStatus(r *UserReconciler, user *securityv1alpha1.User, responseResult string, responseBody []byte) error
SetUserStatus - parse http response code, set status and update CR
func UpdateRoleMapping ¶
UpdateRoleMapping - make request to create or update RoleMapping for "parent" role
Types ¶
type AlertReconciler ¶
AlertReconciler reconciles a Alert object
func (*AlertReconciler) FinalizeAlert ¶
func (r *AlertReconciler) FinalizeAlert(alert *securityv1alpha1.Alert) error
FinalizeAlert delete alert
func (*AlertReconciler) SetupWithManager ¶
func (r *AlertReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type RoleReconciler ¶
RoleReconciler reconciles a Role object
func (*RoleReconciler) FinalizeRole ¶
func (r *RoleReconciler) FinalizeRole(role *securityv1alpha1.Role) error
FinalizeRole delete role
func (*RoleReconciler) SetupWithManager ¶
func (r *RoleReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type UserReconciler ¶
UserReconciler reconciles a User object
func (*UserReconciler) FinalizeUser ¶
func (r *UserReconciler) FinalizeUser(user *securityv1alpha1.User) error
FinalizeUser delete user
func (*UserReconciler) SetupWithManager ¶
func (r *UserReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.