public class FlinkSecurityManager extends SecurityManager
FlinkSecurityManager
to control certain behaviors that can be captured by Java system
security manager. It can be used to control unexpected user behaviors that potentially impact
cluster availability, for example, it can warn or prevent user code from terminating JVM by
System.exit or halt by logging or throwing an exception. This does not necessarily prevent
malicious users who try to tweak security manager on their own, but more for being dependable
against user mistakes by gracefully handling them informing users rather than causing silent
unavailability.inCheck
Modifier and Type | Method and Description |
---|---|
void |
checkExit(int status) |
void |
checkPermission(Permission perm) |
void |
checkPermission(Permission perm,
Object context) |
static void |
forceProcessExit(int exitCode)
Use this method to circumvent the configured
FlinkSecurityManager behavior, ensuring
that the current JVM process will always stop via System.exit() or
Runtime.getRuntime().halt(). |
static void |
monitorUserSystemExitForCurrentThread() |
static void |
setFromConfiguration(Configuration configuration) |
static void |
unmonitorUserSystemExitForCurrentThread() |
checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader
public static void setFromConfiguration(Configuration configuration)
public static void monitorUserSystemExitForCurrentThread()
public static void unmonitorUserSystemExitForCurrentThread()
public void checkPermission(Permission perm)
checkPermission
in class SecurityManager
public void checkPermission(Permission perm, Object context)
checkPermission
in class SecurityManager
public void checkExit(int status)
checkExit
in class SecurityManager
public static void forceProcessExit(int exitCode)
FlinkSecurityManager
behavior, ensuring
that the current JVM process will always stop via System.exit() or
Runtime.getRuntime().halt().Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.