Package io.pravega.shared.security.auth
Interface AuthorizationResource
-
- All Known Implementing Classes:
AuthorizationResourceImpl
public interface AuthorizationResourceThis interface provides string representations of auth-protected resources.Background:
In general, authorization is about granting a subject access to perform a particular action on an object/resource.
In Pravega,
- A subject is represented as an instance of type
Principal. - An action is represented as an element of enum type
AuthHandler.Permissions. - An object is represented by an instance of this class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringofInternalStream(java.lang.String scopeName, java.lang.String streamName)Creates a resource representation for use in authorization of actions related to the specified internal stream.java.lang.StringofKeyValueTableInScope(java.lang.String scopeName, java.lang.String kvtName)Creates a resource representation for use in authorization of actions pertaining to the specified KeyValueTable within the specified scope.java.lang.StringofKeyValueTablesInScope(java.lang.String scopeName)Creates a resource representation for use in authorization of actions pertaining to the collection of Key-Value tables within the specified scope.java.lang.StringofReaderGroupInScope(java.lang.String scopeName, java.lang.String readerGroupName)Creates a resource representation for use in authorization of actions pertaining to the specified reader group within the specified scope.java.lang.StringofReaderGroupsInScope(java.lang.String scopeName)Creates a resource representation for use in authorization of actions pertaining to the collection of reader groups within the specified scope.java.lang.StringofScope(java.lang.String scopeName)Creates a resource representation for use in authorization of actions pertaining to the specified scope.java.lang.StringofScopes()Creates a resource representation for use in authorization of actions pertaining to the collection of scopes in the system.java.lang.StringofStreamInScope(java.lang.String scopeName, java.lang.String streamName)Creates a resource representation for use in authorization of actions pertaining to the specified stream within the specified scope.java.lang.StringofStreamsInScope(java.lang.String scopeName)Creates a resource representation for use in authorization of actions pertaining to the collection of streams within the specified scope.
-
-
-
Method Detail
-
ofScopes
java.lang.String ofScopes()
Creates a resource representation for use in authorization of actions pertaining to the collection of scopes in the system.- Returns:
- a string representing the collections of scopes in the system
-
ofScope
java.lang.String ofScope(java.lang.String scopeName)
Creates a resource representation for use in authorization of actions pertaining to the specified scope.- Parameters:
scopeName- the name of the scope- Returns:
- a string representing the scope with the specified name
- Throws:
java.lang.NullPointerException- ifscopeNameis nulljava.lang.IllegalArgumentException- ifscopeNameis empty
-
ofStreamsInScope
java.lang.String ofStreamsInScope(java.lang.String scopeName)
Creates a resource representation for use in authorization of actions pertaining to the collection of streams within the specified scope.- Parameters:
scopeName- the name of the scope- Returns:
- a string representing the collection of streams under the scope with the specified name
- Throws:
java.lang.NullPointerException- ifscopeNameis nulljava.lang.IllegalArgumentException- ifscopeNameis empty
-
ofStreamInScope
java.lang.String ofStreamInScope(java.lang.String scopeName, java.lang.String streamName)Creates a resource representation for use in authorization of actions pertaining to the specified stream within the specified scope.- Parameters:
scopeName- the name of the scopestreamName- the name of the stream- Returns:
- a string representing the specified stream within the specified scope
- Throws:
java.lang.NullPointerException- ifscopeNameorstreamNameare nulljava.lang.IllegalArgumentException- ifscopeNameorstreamNameare empty
-
ofReaderGroupsInScope
java.lang.String ofReaderGroupsInScope(java.lang.String scopeName)
Creates a resource representation for use in authorization of actions pertaining to the collection of reader groups within the specified scope.- Parameters:
scopeName- the name of the scope- Returns:
- a string representing the specified the collection of reader groups
- Throws:
java.lang.NullPointerException- ifscopeNameis nulljava.lang.IllegalArgumentException- ifscopeNameis empty
-
ofReaderGroupInScope
java.lang.String ofReaderGroupInScope(java.lang.String scopeName, java.lang.String readerGroupName)Creates a resource representation for use in authorization of actions pertaining to the specified reader group within the specified scope.- Parameters:
scopeName- the name of the scopereaderGroupName- the name of the reader group- Returns:
- a string representing the specified reader group
- Throws:
java.lang.NullPointerException- ifscopeNameorstreamNameare nulljava.lang.IllegalArgumentException- ifscopeNameorstreamNameare empty
-
ofKeyValueTablesInScope
java.lang.String ofKeyValueTablesInScope(java.lang.String scopeName)
Creates a resource representation for use in authorization of actions pertaining to the collection of Key-Value tables within the specified scope.- Parameters:
scopeName- the name of the scope- Throws:
java.lang.NullPointerException- ifscopeNameis nulljava.lang.IllegalArgumentException- ifscopeNameis empty
-
ofKeyValueTableInScope
java.lang.String ofKeyValueTableInScope(java.lang.String scopeName, java.lang.String kvtName)Creates a resource representation for use in authorization of actions pertaining to the specified KeyValueTable within the specified scope.- Parameters:
scopeName- the name of the scopekvtName- the name of the KeyValueTable- Returns:
- a string representing the specified kvtable within the specified scope
- Throws:
java.lang.NullPointerException- ifscopeNameorkvtNameare nulljava.lang.IllegalArgumentException- ifscopeNameorkvtNameare empty
-
ofInternalStream
java.lang.String ofInternalStream(java.lang.String scopeName, java.lang.String streamName)Creates a resource representation for use in authorization of actions related to the specified internal stream.- Parameters:
scopeName- the name of the scopestreamName- the name of the internal stream- Returns:
- a string representing the resource
-
-