Mule Secure Configuration Properties uses the secure:: prefix when an application references a property stored in a secure configuration properties file. Therefore, a property named tls.keystore.keyPassword is referenced using:
${secure::tls.keystore.keyPassword}
MuleSoft's Secure Configuration Properties documentation specifically states that the secure:: prefix is required when loading values from a secure properties file. The same syntax is used whether the property is consumed by a TLS configuration, connector configuration, global element, or another Mule component.
The ${...} syntax represents Mule configuration-property resolution. By contrast, DataWeave runtime expressions use the #[...] form; simply placing a secure-property identifier inside that syntax does not constitute the documented secure configuration-property reference. Likewise, the other alternatives do not use the required Mule configuration-property syntax.
This distinction is particularly important for TLS credentials. A keystore key password should be maintained externally from Mule XML, encrypted in the secure properties source, and resolved through the Secure Configuration Properties module at runtime.
Therefore, the correct reference is ${secure::tls.keystore.keyPassword}.
Reference topics: Secure Configuration Properties; secure:: prefix; encrypted application properties; TLS keystore credentials.
Official documentation: https://docs.mulesoft.com/mule-runtime/4.9/secure-configuration-properties
===============================================================