{"record":{"id":"787ddf3e81e91e7f","repo":"kestra-io/kestra","slug":"unable-to-use-a-secret-input-output-as-encryptio","errorCode":null,"errorMessage":"Unable to use a `SECRET` input/output as encryption is not configured","messagePattern":"Unable to use a `SECRET` input/output as encryption is not configured","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/kestra/core/runners/FlowInputOutput.java","lineNumber":544,"sourceCode":"        }\n\n        final Type elementType = data instanceof ItemTypeInterface itemTypeInterface ? itemTypeInterface.getItemType() : null;\n\n        return Optional.of(\n            new AbstractMap.SimpleEntry<>(\n                data.getId(),\n                parseType(execution, data.getType(), data.getId(), elementType, current, data)\n            )\n        );\n    }\n\n    private Object parseType(Execution execution, Type type, String id, Type elementType, Object current, Data data) throws Exception {\n        try {\n            return switch (type) {\n                case SELECT, STRING, EMAIL -> current.toString();\n                case SECRET -> {\n                    if (secretKey.isEmpty()) {\n                        throw new Exception(\"Unable to use a `SECRET` input/output as encryption is not configured\");\n                    }\n                    if (data instanceof SecretInput secretInput) {\n                        secretInput.validate(current.toString());\n                    }\n                    String encrypted = EncryptionService.encrypt(secretKey.get(), current.toString());\n                    yield EncryptedString.from(encrypted);\n                }\n                case INT -> TypeConverter.toInteger(current);\n                // Assuming that after the render we must have a double/int, so we can safely use its toString representation\n                case FLOAT -> TypeConverter.toFloat(current);\n                case BOOL -> TypeConverter.toBoolean(current);\n                case DATETIME -> TypeConverter.toInstant(current);\n                case DATE -> TypeConverter.toLocalDate(current);\n                case TIME -> TypeConverter.toLocalTime(current);\n                case DURATION -> TypeConverter.toDuration(current);\n                case FILE -> {\n                    URI uri = URI.create(current.toString().replace(File.separator, \"/\"));\n","sourceCodeStart":526,"sourceCodeEnd":562,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/core/src/main/java/io/kestra/core/runners/FlowInputOutput.java#L526-L562","documentation":"Error \"Unable to use a `SECRET` input/output as encryption is not configured\" thrown in kestra-io/kestra.","triggerScenarios":"Thrown at core/src/main/java/io/kestra/core/runners/FlowInputOutput.java:544 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure encryption by setting the 'kestra.encryption.secret-key' property so SECRET inputs/outputs can be used.","Change the input/output type from SECRET to a non-secret type if encryption is not required."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}