All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.groupbyinc.flux.common.settings.KeyStoreWrapper.class Maven / Gradle / Ivy

There is a newer version: 198
Show newest version
????4?3com/groupbyinc/flux/common/settings/KeyStoreWrapperjava/lang/Object2com/groupbyinc/flux/common/settings/SecureSettingsKeyStoreWrapper.java;com/groupbyinc/flux/common/settings/KeyStoreWrapper$KeyTypeKeyType5com/groupbyinc/flux/common/settings/KeyStoreWrapper$1)java/security/KeyStore$PasswordProtection
java/security/KeyStorePasswordProtectionjava/security/KeyStore$EntryEntry%java/security/KeyStore$SecretKeyEntrySecretKeyEntryjava/util/Map$Entry
java/util/Map*java/security/KeyStore$ProtectionParameterProtectionParameter4com/groupbyinc/flux/common/settings/Setting$Property+com/groupbyinc/flux/common/settings/Setting!Propertyjava/util/Base64$Decoder$java/util/Base64&Decoderjava/util/Base64$Encoder)Encoder%java/lang/invoke/MethodHandles$Lookup,java/lang/invoke/MethodHandles.LookupSEED_SETTING-Lcom/groupbyinc/flux/common/settings/Setting;aLcom/groupbyinc/flux/common/settings/Setting;
SEED_CHARS[CKEYSTORE_FILENAMELjava/lang/String;elasticsearch.keystore8FORMAT_VERSIONIMIN_FORMAT_VERSIONNEW_KEYSTORE_TYPEPKCS12@NEW_KEYSTORE_STRING_KEY_ALGOPBECNEW_KEYSTORE_FILE_KEY_ALGO
ASCII_ENCODER!Ljava/nio/charset/CharsetEncoder;
formatVersionhasPasswordZtype
stringFactoryLjavax/crypto/SecretKeyFactory;fileFactorysettingTypesLjava/util/Map;`Ljava/util/Map;
keystoreBytes[Bkeystore7Lcom/groupbyinc/flux/common/apache/lucene/util/SetOnce;QLcom/groupbyinc/flux/common/apache/lucene/util/SetOnce;keystorePassworddLcom/groupbyinc/flux/common/apache/lucene/util/SetOnce;$assertionsDisabledL(IZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;[B)V&java/security/NoSuchAlgorithmException\()VZ^
_5com/groupbyinc/flux/common/apache/lucene/util/SetOncea
b_TU	dWU	fH;	hIJ	jK7	ljavax/crypto/SecretKeyFactoryngetInstance3(Ljava/lang/String;)Ljavax/crypto/SecretKeyFactory;pq
orLM	tNM	vjava/lang/StringxSjava/lang/RuntimeException{(Ljava/lang/Throwable;)VZ}
|~OP	?RS	?e(Ljava/security/NoSuchAlgorithmException;this5Lcom/groupbyinc/flux/common/settings/KeyStoreWrapper;
stringKeyAlgofileKeyAlgokeystorePath*(Ljava/nio/file/Path;)Ljava/nio/file/Path;java/nio/file/Path?resolve((Ljava/lang/String;)Ljava/nio/file/Path;????	configDirLjava/nio/file/Path;create9([C)Lcom/groupbyinc/flux/common/settings/KeyStoreWrapper;java/lang/Exception?5java/util/HashMap?
?_Z[
?,(Ljava/lang/String;)Ljava/security/KeyStore;p?
?load(Ljava/io/InputStream;[C)V??
?set(Ljava/lang/Object;)V??
b?([C)VZ?
?addBootstrapSeed8(Lcom/groupbyinc/flux/common/settings/KeyStoreWrapper;)V??
?passwordwrapperkeyStoreLjava/security/KeyStore;&java/security/GeneralSecurityException?YJ	?getSettingNames()Ljava/util/Set;??
?12	?getKey()Ljava/lang/String;??
"?
java/util/Set?contains(Ljava/lang/Object;)Z????java/lang/AssertionError?
?_%com/groupbyinc/flux/common/Randomness?createSecure()Ljava/security/SecureRandom;??
??java/security/SecureRandom?45	?nextInt(I)I??
??	setString(Ljava/lang/String;[C)V??
?java/util/Arrays?fill([CC)V??
??irandomLjava/security/SecureRandom;passwordLength
charactersK(Ljava/nio/file/Path;)Lcom/groupbyinc/flux/common/settings/KeyStoreWrapper;java/io/IOException?java/lang/Throwable???
?java/nio/file/LinkOption?java/nio/file/Files?exists2(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z??
??@com/groupbyinc/flux/common/apache/lucene/store/SimpleFSDirectory?(Ljava/nio/file/Path;)VZ?
??8com/groupbyinc/flux/common/apache/lucene/store/IOContext?READONCE:Lcom/groupbyinc/flux/common/apache/lucene/store/IOContext;??	?	openInput?(Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/store/IOContext;)Lcom/groupbyinc/flux/common/apache/lucene/store/IndexInput;
?Icom/groupbyinc/flux/common/apache/lucene/store/BufferedChecksumIndexInput>(Lcom/groupbyinc/flux/common/apache/lucene/store/IndexInput;)VZ
	9com/groupbyinc/flux/common/apache/lucene/codecs/CodecUtilcheckHeaderQ(Lcom/groupbyinc/flux/common/apache/lucene/store/DataInput;Ljava/lang/String;II)I

Acom/groupbyinc/flux/common/apache/lucene/store/ChecksumIndexInputreadByte()B
9com/groupbyinc/flux/common/apache/lucene/store/IndexInputjava/lang/IllegalStateExceptionjava/lang/StringBuilder
_ hasPassword boolean is corrupt: append-(Ljava/lang/String;)Ljava/lang/StringBuilder; !
"java/util/Locale$ROOTLjava/util/Locale;&'	%(%02x*java/lang/Byte,valueOf(B)Ljava/lang/Byte;./
-0formatK(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;23
y4toString6?
7(Ljava/lang/String;)VZ9
:
readString<?
=readMapOfStrings()Ljava/util/Map;?@
AentrySetC?Dstream()Ljava/util/stream/Stream;FG?H"java/lang/invoke/LambdaMetafactoryJmetafactory?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;LM
KNO&(Ljava/lang/Object;)Ljava/lang/Object;Q()Ljava/lang/Object;?ST	U)(Ljava/util/Map$Entry;)Ljava/lang/String;Wapply()Ljava/util/function/Function;YZ[
lambda$load$0T(Ljava/util/Map$Entry;)Lcom/groupbyinc/flux/common/settings/KeyStoreWrapper$KeyType;]^
_`^[java/util/stream/CollectorsdtoMapX(Ljava/util/function/Function;Ljava/util/function/Function;)Ljava/util/stream/Collector;fg
ehjava/util/stream/Streamjcollect0(Ljava/util/stream/Collector;)Ljava/lang/Object;lmknreadInt()Ipq
r	readBytes([BII)Vtu
vcheckFooterF(Lcom/groupbyinc/flux/common/apache/lucene/store/ChecksumIndexInput;)Jxy
zclose|^
}
addSuppressed}
??inputCLcom/groupbyinc/flux/common/apache/lucene/store/ChecksumIndexInput;hasPasswordByteB
indexInput;Lcom/groupbyinc/flux/common/apache/lucene/store/IndexInput;keystoreFile	directoryBLcom/groupbyinc/flux/common/apache/lucene/store/SimpleFSDirectory;upgradeL(Lcom/groupbyinc/flux/common/settings/KeyStoreWrapper;Ljava/nio/file/Path;)Vsave??
?isLoaded()Zget?S
b?decrypt#Keystore has already been decrypted?java/io/ByteArrayInputStream?([B)VZ?
??java/io/InputStream?
?}([BB)V??
??aliases()Ljava/util/Enumeration;??
?java/util/Enumeration?hasMoreElements????nextElement?S??STRING=Lcom/groupbyinc/flux/common/settings/KeyStoreWrapper$KeyType;??		?put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;???java/util/HashSet?keySet???(Ljava/util/Collection;)VZ?
??remove????java/lang/SecurityException?,Keystore has been corrupted or tampered with?
?:isEmpty????inLjava/io/InputStream;settingNameexpectedSettings#Ljava/util/Set;Ljava/util/Set;+Ljava/util/Enumeration;Ljava/util/Enumeration;#java/nio/file/AccessDeniedException???
?getPassword()[C??
?elasticsearch.keystore.tmp?DEFAULT??	??createOutput?(Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/store/IOContext;)Lcom/groupbyinc/flux/common/apache/lucene/store/IndexOutput;??
??writeHeaderQ(Lcom/groupbyinc/flux/common/apache/lucene/store/DataOutput;Ljava/lang/String;I)V??
?:com/groupbyinc/flux/common/apache/lucene/store/IndexOutput?	writeByte(B)V??
??writeString?9
??
lambda$save$1?W
??[writeMapOfStrings(Ljava/util/Map;)V??
??equals??
y?keystore type changed?Z?
??getAlgorithm?
ostring pbe algo changedfile pbe algo changedjava/io/ByteArrayOutputStream
_store(Ljava/io/OutputStream;[C)V

toByteArray()[B
writeInt(I)V
?
writeBytes([BI)V
?writeFooter?(Lcom/groupbyinc/flux/common/apache/lucene/store/IndexOutput;)V

?}Punable to create temporary keystore at [%s], please check filesystem permissions%com/groupbyinc/flux/cli/UserException!+(ILjava/lang/String;Ljava/lang/Throwable;)VZ#
"$java/nio/file/CopyOption& java/nio/file/StandardCopyOption(REPLACE_EXISTING"Ljava/nio/file/StandardCopyOption;*+	),ATOMIC_MOVE.+	)/moveY(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/CopyOption;)Ljava/nio/file/Path;12
?3.java/nio/file/attribute/PosixFileAttributeView5getFileAttributeViewm(Ljava/nio/file/Path;Ljava/lang/Class;[Ljava/nio/file/LinkOption;)Ljava/nio/file/attribute/FileAttributeView;78
?9	rw-rw----;,java/nio/file/attribute/PosixFilePermissions=
fromString#(Ljava/lang/String;)Ljava/util/Set;?@
>AsetPermissions(Ljava/util/Set;)VCD6EkeystoreBytesStreamLjava/io/ByteArrayOutputStream;outputjava/lang/Class?desiredAssertionStatus??
??
keystore.seed?1com/groupbyinc/flux/common/settings/SecureSetting?secureString?(Ljava/lang/String;Lcom/groupbyinc/flux/common/settings/Setting;[Lcom/groupbyinc/flux/common/settings/Setting$Property;)Lcom/groupbyinc/flux/common/settings/Setting;??
??LABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~!@#$%^&*-_=+??toCharArray??
y?!java/nio/charset/StandardCharsets?US_ASCIILjava/nio/charset/Charset;??	??java/nio/charset/Charset?
newEncoder#()Ljava/nio/charset/CharsetEncoder;??
??	Signature
ConstantValueCodeLocalVariableTableLocalVariableTypeTableLineNumberTable
StackMapTable?(IZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;[B)V
Exceptions%()Ljava/util/Set;BootstrapMethods
SourceFileInnerClasses!12?34567?9:;?<=;?>?7?AB7?DE7?DFGH;IJK7LMNMOP?QRSTU?VWU?XYJZ[?F	W*?`*?bY?c?e*?bY?c?g*?i*?k*-?m*?s?u*?s?w?:?|Y??*??*???);>]?\	@
??W??WH;WIJWK7W?7W?7WOPWRS?WOQ?:?????$?)?2?;?>?@?J?P?V??!?>yyyz]??	???3	*9????	????	????	J?Y*???ADD??Y????LA??M,??+?e,??+?g?Y*????+??+?? J?5!)??'#????!?'?-?5?D?H??%??????	????[???*???????????Y?ʿ??L=?N6?-??+?Ծ??4U????*????-??-???4.?;[??$7??'4?;+0?5?*
? ?$?'?+?4?D?J?U?Z?? ?
?????	????	g*??L+???????Y*??M,9??N:?Y-?
:9?6?6??6?8?3?Y?Y??#?)+?Y?1S?5?#?8?;??>:	?>:
?
?>:?D:?,?B?E?I?\?c?i?o?:???Y??:?s?:


??w?{X?Y	

??:-??-?~?:???-?~?::?:-??-?~?:???-?~?#&?(9?(BMQT?9DB????7?OP2??=?H;D???Q?IJ??K7	???7
???7?TOP?KRS
%B??g??b??L????OQ?TOQ?r?????(?2?=?D?Q?[?z??????????????????????????6?9?B??????;????@?;?yy?y.??@????yyyz???????H??????????	???j*??????????*??*+????????????????????E*?e???????????@I??/*?k??????????@*?e????Y??;?*?e*?m??????Y*????MN*?e???,+??,?K-?,???@:-???5,???.:N?:,?-?,???:-???,???*?????:*?????*?g?Y+????+??*?e?????M*?i?",???k*??,??????W????Y*??????N,???',???y:-?????Yŷƿ???-?????Yŷƿ?HLO?1@a?1@iswz?aki#??????>/]???7?A??@??@?5?z????A???z???j
#1@ai??	??
??
?????(+4??b?9????
F?G???????
??J??)???)???????????*?՚??Y?ʿ*?g?????M??Y+??N?:-?޶?::9??,?????A??D??D??*???E?I?\???i?o??????*?mA?????Y???????*?u?D?????Y??????*?w?D?????Y????Y?	:*?e???,?
?:??????U???H:???<??4::?:	?!???:

????	??-:?) ?Y+??S?5:?"YN?%?+??:+???'Y?-SY?0S?4W6??:?6:?"?'@M)V@~F?@?A?D?A?E?H?I?J?K?M?O???<???y???????y????\?H?G?H??
???y????????yB?)?F?6?????4
*??????
???S??PQ?!????*?՚??Y?ʿ*?e???+*?g????UM*??+?W???
,??%?Y?Y?Y?#+?#[?#?8?;?,?N*?u-?_a?e?a:?gY?h?i:?l??>????m7.gnol)pqrs?tu?&	YZ.[E]g`lab?c?d?
?/!??vw??Ų??*?՚??Y?ʿ*?e???+*?g????UM*??+?W?z?
,??%?Y?Y?Y?#+?#|?#?8?;?,?N*?w-?_a?e?a:?h:??:6??4?T?????l?Y*?:??????\	??;????m7.?nolYpqFrs???5?8?S?	???:ij.kEmgolpr?s?t?u?t?w?x??*?/!?(ya?z???????l???*?՚??Y?ʿ??,???????Y????*?u?aY,????N*?e???+?Y-??*?g?????*??+????W??*l??lm7lt5=/?????"?-?=?]?k???????|???*?՚??Y?ʿ??,??M,??N6-??-,3?U????*?u?aY-????:*?e???+?Y??*?g?????*??+?z??W??>%?;|??|m7|?S"Z?5L0???*
???"?,?5?;?L?m?{??
??????9?x/???*?՚??Y?ʿ*?e???+??*??+??W??/??/m7???#?.????|^??%*?g???*?g??????
L??Y+??????	??%????
????$??B?	??
?W?7
*???	?Ȱ?
???1
]^?7
*???y?̰?
?????^?d1?Қ????? ?ڳ?ܶ߳Բ?????LNQ!R'm?@? PRVXPRabPR?X??Z	
@				 "#@%'(	*'+	-/0




© 2015 - 2024 Weber Informatics LLC | Privacy Policy