jadex.bridge.service.annotation.Security Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-platform-bridge Show documentation
Show all versions of jadex-platform-bridge Show documentation
Jadex bridge is a base package for kernels and platforms, i.e., it is used by both and provides commonly used interfaces and classes for active components and their management.
package jadex.bridge.service.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Set the roles that would allow access to a service interface or service method.
*/
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Security
{
//-------- constants --------
/** The unrestricted role (access is granted to all), e.g. used for chat. */
public static final String UNRESTRICTED = "__jadex-role-unrestricted__";
/** The default role that is assigned to services without security annotation and granted in all authenticated networks. */
public static final String TRUSTED = "trusted";
/** The admin role that is required by all jadex system services, e.g. CMS. */
public static final String ADMIN = "admin";
//-------- properties --------
/**
* Use predefined role: see constants unrestricted, default and admin.
* Custom role(s): Allow only authentication secrets (e.g. network or platform key)
* that are locally given at least one of the requested roles.
*/
public String[] roles() default TRUSTED;
}