com.groupbyinc.flux.plugins.PluginSecurity.class Maven / Gradle / Ivy
???? 4* *com/groupbyinc/flux/plugins/PluginSecurity java/lang/Object PluginSecurity.java ,com/groupbyinc/flux/plugins/PluginSecurity$1 *com/groupbyinc/flux/cli/Terminal$Verbosity com/groupbyinc/flux/cli/Terminal
Verbosity java/security/Policy$Parameters
java/security/Policy
Parameters ()V
this ,Lcom/groupbyinc/flux/plugins/PluginSecurity;
readPolicy (Lcom/groupbyinc/flux/plugins/PluginInfo;Ljava/nio/file/Path;Lcom/groupbyinc/flux/cli/Terminal;Ljava/util/function/Supplier;Z)V java/io/IOException java/util/function/Supplier get ()Ljava/lang/Object; java/nio/file/Path " parsePermissions p(Lcom/groupbyinc/flux/cli/Terminal;Ljava/nio/file/Path;Ljava/nio/file/Path;)Ljava/security/PermissionCollection; $ %
& "java/security/PermissionCollection ( elements ()Ljava/util/Enumeration; * +
) , java/util/Collections . list .(Ljava/util/Enumeration;)Ljava/util/ArrayList; 0 1
/ 2 java/util/List 4 isEmpty ()Z 6 7 5 8 VERBOSE ,Lcom/groupbyinc/flux/cli/Terminal$Verbosity; : ; < 7plugin has a policy file with no additional permissions > println A(Lcom/groupbyinc/flux/cli/Terminal$Verbosity;Ljava/lang/String;)V @ A
B
sort )(Ljava/util/List;Ljava/util/Comparator;)V E F
/ G NORMAL I ; J ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ L ;@ WARNING: plugin requires additional permissions @ N iterator ()Ljava/util/Iterator; P Q 5 R java/util/Iterator T hasNext V 7 U W next Y U Z java/security/Permission \ java/lang/StringBuilder ^
_ * a append -(Ljava/lang/String;)Ljava/lang/StringBuilder; c d
_ e formatPermission .(Ljava/security/Permission;)Ljava/lang/String; g h
i toString ()Ljava/lang/String; k l
_ m SSee http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html o Jfor descriptions of what these permissions allow and the associated risks. q prompt &(Lcom/groupbyinc/flux/cli/Terminal;Z)V s t
u &com/groupbyinc/flux/plugins/PluginInfo w hasNativeController y 7
x z ;@ WARNING: plugin forks a native controller @ | HThis plugin launches a native controller that is not subject to the Java ~ ,security manager nor to system call filters. ?
permission Ljava/security/Permission; info (Lcom/groupbyinc/flux/plugins/PluginInfo; file Ljava/nio/file/Path; terminal "Lcom/groupbyinc/flux/cli/Terminal; tmpFile 3Ljava/util/function/Supplier; Ljava/util/function/Supplier; batch Z permissions $Ljava/security/PermissionCollection; requested ,Ljava/util/List; Ljava/util/List; ? !Continue with installation? [y/N] ? readText &(Ljava/lang/String;)Ljava/lang/String; ? ?
? y ? java/lang/String ? equalsIgnoreCase (Ljava/lang/String;)Z ? ?
? ? java/lang/RuntimeException ? installation aborted by user ? (Ljava/lang/String;)V ?
? ? text Ljava/lang/String; "java/security/UnresolvedPermission ? getUnresolvedType ? l
? ? getClass ()Ljava/lang/Class; ? ?
? java/lang/Class ? getName ? l
? ? getUnresolvedName ? l
? ?
] ? length ()I ? ?
? ? (C)Ljava/lang/StringBuilder; c ?
_ ? getUnresolvedActions ? l
? ?
getActions ? l
] ? sb Ljava/lang/StringBuilder; clazz name actions &java/security/NoSuchAlgorithmException ? empty ? tmp ? %java/nio/file/attribute/FileAttribute ? java/nio/file/Files ? createTempFile v(Ljava/nio/file/Path;Ljava/lang/String;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path; ? ?
? ?
JavaPolicy ? java/security/URIParameter ? toUri ()Ljava/net/URI; ? ? # ? (Ljava/net/URI;)V ?
? ? getInstance K(Ljava/lang/String;Ljava/security/Policy$Parameters;)Ljava/security/Policy; ? ?
? (Ljava/lang/Throwable;)V ?
? ? 5com/groupbyinc/flux/common/apache/lucene/util/IOUtils ? rm ([Ljava/nio/file/Path;)V ? ?
? ? getProtectionDomain "()Ljava/security/ProtectionDomain; ? ?
? ? getPermissions F(Ljava/security/ProtectionDomain;)Ljava/security/PermissionCollection; ? ?
? UNSUPPORTED_EMPTY_COLLECTION ? ? 'java/lang/UnsupportedOperationException AJavaPolicy implementation does not support retrieving permissions
? java/security/Permissions
java/util/ArrayList
R implies =(Ljava/security/ProtectionDomain;Ljava/security/Permission;)Z
add (Ljava/security/Permission;)V
) setReadOnly
) emptyPolicy Ljava/security/Policy; e (Ljava/security/NoSuchAlgorithmException; policy tmpDir emptyPolicyFile actualPermissions Code LocalVariableTable LineNumberTable LocalVariableTypeTable
StackMapTable
Exceptions Signature ?(Lcom/groupbyinc/flux/plugins/PluginInfo;Ljava/nio/file/Path;Lcom/groupbyinc/flux/cli/Terminal;Ljava/util/function/Supplier;Z)V
SourceFile InnerClasses / *? ? ! " ) ? ?,+-? ! ? #? ':? -? 3:? 9 ? ,? =?? C? ?? Y? D? H,? KM? C,? KO? C,? KM? C? S :? X ? 0? [ ? ]:,? K? _Y? `b? f? j? f? n? C???,? Kp? C,? Kr? C,? v*? {? 6,? KM? C,? K}? C,? KM? C,? K? C,? K?? C,? v? ! R v ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # ? ? ? ? ? ? " Z / 0 1 $ 2 0 6 <