Store files without using FileDocuments

To use the Kafka Module with SSL security, I have to configure the location of the key store. The easiest solution is to add the key store in the Resources folder when creating a deployment package. However, I want to manage these key stores at run time. Therefore, I am looking for a way to save a file to a specific location. I have considered the following approaches: Writing files to the Resources folder works, but only temporarily: on application restart, the key store is removed. Write files to the Temporary folder, but they are not temporary, and how the clean up of this folder is done is unclear. Reverse engineer the location of the file which is stored with the FileDocument interface, but this does not seem like a stable solution as Mendix could change its implementation.   This leads to the question in the topic: where can I (persistently) store files without using the FileDocument interface?
1 answers

To expand on Ronald's answer: the SAML module tries to use the JVM keystore. The CredentialRepository class from package contains the following code:


    private static KeyStore loadJVMKeyStore() throws KeyStoreException,
            NoSuchAlgorithmException, CertificateException,
            FileNotFoundException, IOException {
        KeyStore keyStore = KeyStore.getInstance("JKS");

        String keyStoreResource = System.getProperty("");

        if (keyStoreResource != null) {
            // applicable if certificates have been manually added to the server
            // (e.g. in the Mx modeler or in the cloud)
            File keyStoreFile = new File(keyStoreResource);

            if (jvmKeyStorePW == null) {
                jvmKeyStorePW = System.getProperty("");

            keyStore.load(new FileInputStream(keyStoreFile),
        } else {
            // create a new store when no certificates have been manually added
            // to the server
            if (jvmKeyStorePW == null) {
                jvmKeyStorePW = saml20.proxies.constants.Constants.getKeystorePassword();
            keyStore.load(null, jvmKeyStorePW.toCharArray());
        return keyStore;