PHP Class Neos\Flow\Command\SecurityCommandController

Inheritance: extends Neos\Flow\Cli\CommandController
Mostrar archivo Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$methodPermissionCache Neos\Cache\Frontend\VariableFrontend
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$policyService Neos\Flow\Security\Policy\PolicyService
$reflectionService Neos\Flow\Reflection\ReflectionService
$rsaWalletService Neos\Flow\Security\Cryptography\RsaWalletServicePhp

Public Methods

Method Description
generateKeyPairCommand ( boolean $usedForPasswords = false ) : void Generate a public/private key pair and add it to the RSAWalletService
importPrivateKeyCommand ( boolean $usedForPasswords = false ) : void Import a private key
importPublicKeyCommand ( ) : void Import a public key
injectCacheManager ( CacheManager $cacheManager ) : void Injects the Cache Manager because we cannot inject an automatically factored cache during compile time.
showEffectivePolicyCommand ( string $privilegeType, string $roles = '' ) Shows a list of all defined privilege targets and the effective permissions
showMethodsForPrivilegeTargetCommand ( string $privilegeTarget ) : void Shows the methods represented by the given security privilege target
showUnprotectedActionsCommand ( ) : void Lists all public controller actions not covered by the active security policy

Method Details

generateKeyPairCommand() public method

Generate a public/private key pair and add it to the RSAWalletService
public generateKeyPairCommand ( boolean $usedForPasswords = false ) : void
$usedForPasswords boolean If the private key should be used for passwords
return void

importPrivateKeyCommand() public method

Read a PEM formatted private key from stdin and import it into the RSAWalletService. The public key will be automatically extracted and stored together with the private key as a key pair. You can generate the same fingerprint returned from this using these commands: ssh-keygen -yf my-key.pem > my-key.pub ssh-keygen -lf my-key.pub To create a private key to import using this method, you can use: ssh-keygen -t rsa -f my-key ./flow security:importprivatekey < my-key Again, the fingerprint can also be generated using: ssh-keygen -lf my-key.pub
public importPrivateKeyCommand ( boolean $usedForPasswords = false ) : void
$usedForPasswords boolean If the private key should be used for passwords
return void

importPublicKeyCommand() public method

Read a PEM formatted public key from stdin and import it into the RSAWalletService.
public importPublicKeyCommand ( ) : void
return void

injectCacheManager() public method

Injects the Cache Manager because we cannot inject an automatically factored cache during compile time.
public injectCacheManager ( CacheManager $cacheManager ) : void
$cacheManager Neos\Flow\Cache\CacheManager
return void

showEffectivePolicyCommand() public method

Shows a list of all defined privilege targets and the effective permissions
public showEffectivePolicyCommand ( string $privilegeType, string $roles = '' )
$privilegeType string The privilege type ("entity", "method" or the FQN of a class implementing PrivilegeInterface)
$roles string A comma separated list of role identifiers. Shows policy for an unauthenticated user when left empty.

showMethodsForPrivilegeTargetCommand() public method

If the privilege target has parameters those can be specified separated by a colon for example "parameter1:value1" "parameter2:value2". But be aware that this only works for parameters that have been specified in the policy
public showMethodsForPrivilegeTargetCommand ( string $privilegeTarget ) : void
$privilegeTarget string The name of the privilegeTarget as stated in the policy
return void

showUnprotectedActionsCommand() public method

Lists all public controller actions not covered by the active security policy

Property Details

$methodPermissionCache protected_oe property

protected VariableFrontend,Neos\Cache\Frontend $methodPermissionCache
return Neos\Cache\Frontend\VariableFrontend

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface

$policyService protected_oe property

protected PolicyService,Neos\Flow\Security\Policy $policyService
return Neos\Flow\Security\Policy\PolicyService

$reflectionService protected_oe property

protected ReflectionService,Neos\Flow\Reflection $reflectionService
return Neos\Flow\Reflection\ReflectionService

$rsaWalletService protected_oe property

protected RsaWalletServicePhp,Neos\Flow\Security\Cryptography $rsaWalletService
return Neos\Flow\Security\Cryptography\RsaWalletServicePhp