Package com.dtolabs.rundeck.core.storage
Class KeyStorageContextProvider
- java.lang.Object
-
- com.dtolabs.rundeck.core.storage.KeyStorageContextProvider
-
- All Implemented Interfaces:
AuthStorageContextProvider
public class KeyStorageContextProvider extends java.lang.Object implements AuthStorageContextProvider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
KEYS_PATH_COMPONENT
static java.lang.String
NAME_RES_KEY
static java.lang.String
PATH_RES_KEY
static java.lang.String
PROJECT_PATH_COMPONENT
-
Constructor Summary
Constructors Constructor Description KeyStorageContextProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
authResForPath(org.rundeck.storage.api.Path path)
Map containing path and name given a pathjava.util.Set<com.dtolabs.rundeck.core.authorization.Attribute>
environmentForPath(org.rundeck.storage.api.Path path)
Generate the environment for a path, based on the convention that /project/name/* maps to a project called "name", and anything else is within the application environment.
-
-
-
Field Detail
-
KEYS_PATH_COMPONENT
public static final java.lang.String KEYS_PATH_COMPONENT
- See Also:
- Constant Field Values
-
PROJECT_PATH_COMPONENT
public static final java.lang.String PROJECT_PATH_COMPONENT
- See Also:
- Constant Field Values
-
PATH_RES_KEY
public static final java.lang.String PATH_RES_KEY
- See Also:
- Constant Field Values
-
NAME_RES_KEY
public static final java.lang.String NAME_RES_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
authResForPath
public java.util.Map<java.lang.String,java.lang.String> authResForPath(org.rundeck.storage.api.Path path)
Map containing path and name given a path- Specified by:
authResForPath
in interfaceAuthStorageContextProvider
- Parameters:
path
- path- Returns:
- map
-
environmentForPath
public java.util.Set<com.dtolabs.rundeck.core.authorization.Attribute> environmentForPath(org.rundeck.storage.api.Path path)
Generate the environment for a path, based on the convention that /project/name/* maps to a project called "name", and anything else is within the application environment.- Specified by:
environmentForPath
in interfaceAuthStorageContextProvider
- Parameters:
path
- path- Returns:
- authorization environment: a project environment if the path matches /project/name/*, otherwise the application environment
-
-