1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

added flag enableAclCheck

This commit is contained in:
postmannen 2022-05-27 06:22:51 +02:00
parent a9e06294de
commit 535d5efb08
2 changed files with 11 additions and 1 deletions

View file

@ -859,7 +859,7 @@ Several Request methods exists for handling the management of the active Acl's o
If the element specified is prefixed with **grp_** it will be treated as a group, otherwise it will be treated as a single node or command.
Groups or nodes do not have to exist to be used with an acl. The acl will be created with the elements specifed, and if a non existing group was specified you will have an Acl that is not yet functional, but it will become functional as soon as you add elements to the group's.
Groups or nodes do not have to exist to be used with an acl. The acl will be created with the elements specifed, and if a non existing group was specified you will have an Acl that is not yet functional, but it will become functional as soon as you add elements to the group's.
##### REQAclAddCommand

View file

@ -83,6 +83,8 @@ type Configuration struct {
EnableTUI bool
// EnableSignatureCheck
EnableSignatureCheck bool
// EnableAclCheck
EnableAclCheck bool
// IsCentralAuth
IsCentralAuth bool
// EnableDebug will also enable printing all the messages received in the errorKernel
@ -172,6 +174,7 @@ type ConfigurationFromFile struct {
EnableSocket *bool
EnableTUI *bool
EnableSignatureCheck *bool
EnableAclCheck *bool
IsCentralAuth *bool
EnableDebug *bool
@ -239,6 +242,7 @@ func newConfigurationDefaults() Configuration {
EnableSocket: true,
EnableTUI: false,
EnableSignatureCheck: false,
EnableAclCheck: false,
IsCentralAuth: false,
EnableDebug: false,
@ -433,6 +437,11 @@ func checkConfigValues(cf ConfigurationFromFile) Configuration {
} else {
conf.EnableSignatureCheck = *cf.EnableSignatureCheck
}
if cf.EnableAclCheck == nil {
conf.EnableAclCheck = cd.EnableAclCheck
} else {
conf.EnableAclCheck = *cf.EnableAclCheck
}
if cf.IsCentralAuth == nil {
conf.IsCentralAuth = cd.IsCentralAuth
} else {
@ -617,6 +626,7 @@ func (c *Configuration) CheckFlags() error {
flag.BoolVar(&c.EnableSocket, "enableSocket", fc.EnableSocket, "true/false, for enabling the creation of a steward.sock file")
flag.BoolVar(&c.EnableTUI, "enableTUI", fc.EnableTUI, "true/false for enabling the Terminal User Interface")
flag.BoolVar(&c.EnableSignatureCheck, "enableSignatureCheck", fc.EnableSignatureCheck, "true/false *TESTING* enable signature checking.")
flag.BoolVar(&c.EnableAclCheck, "enableAclCheck", fc.EnableAclCheck, "true/false *TESTING* enable Acl checking.")
flag.BoolVar(&c.IsCentralAuth, "isCentralAuth", fc.IsCentralAuth, "true/false, *TESTING* is this the central auth server")
flag.BoolVar(&c.EnableDebug, "enableDebug", fc.EnableDebug, "true/false, will enable debug logging so all messages sent to the errorKernel will also be printed to STDERR")