178.6. 민감한 정보 숨기기
Camel 2.12에서 사용 가능
기본적으로 Camel은 URI를 사용하여 구성된 엔드포인트와 같은 JMX의 MBean을 구현합니다. 이 구성에는 암호와 같은 중요한 정보가 있을 수 있습니다.
이 정보는 다음과 같이 마스크 옵션을 활성화하여 숨길 수 있습니다.
Java DSL을 사용하면 다음을 통해 이 기능을 켭니다.
// only enable routes when Camel starts context.getManagementStrategy().getManagementAgent().setMask(true);
// only enable routes when Camel starts
context.getManagementStrategy().getManagementAgent().setMask(true);
그리고 Spring DSL에서 다음을 수행합니다.
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<jmxAgent id="agent" mask="true"/>
...
</camelContext>
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<jmxAgent id="agent" mask="true"/>
...
</camelContext>
이렇게 하면 암호 및 암호와 같은 옵션이 있는 URI를 마스킹하고 xxxxxx 를 대체 값으로 사용합니다.
178.6.1. 마스크에 대한 JMX 특성 및 작업 선언 링크 복사링크가 클립보드에 복사되었습니다!
org.apache.camel.api.management.ManagedAttribute 및 org.apache.camel.api.management.ManagedOperation 에서 특성 마스크 를 true 로 설정하여 이 JMX 특성/operation의 결과를 마스킹해야 함을 나타낼 수 있습니다(위에서 활성화되는 경우, 위의 참조).
예를 들어 camel-core org.apache.camel.api.management.mbean.ManagedEndpointMBean 의 기본 관리 끝점에서 EndpointUri JMX 속성이 마스킹됨을 선언했습니다.
@ManagedAttribute(description = "Endpoint URI", mask = true) String getEndpointUri();
@ManagedAttribute(description = "Endpoint URI", mask = true)
String getEndpointUri();