[GitHub] brooklyn-server pull request #195: Sanitize effector parameters when reporti...

2016-06-15 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/brooklyn-server/pull/195


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #195: Sanitize effector parameters when reporti...

2016-06-15 Thread aledsage
Github user aledsage commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/195#discussion_r67142271
  
--- Diff: 
core/src/test/java/org/apache/brooklyn/core/mgmt/internal/TestEntityWithEffectors.java
 ---
@@ -21,15 +21,77 @@
 import org.apache.brooklyn.api.entity.ImplementedBy;
 import org.apache.brooklyn.core.annotation.Effector;
 import org.apache.brooklyn.core.annotation.EffectorParam;
+import org.apache.brooklyn.core.effector.MethodEffector;
 import org.apache.brooklyn.core.test.entity.TestEntity;
 
+/**
+ * Entity for testing that secret effector parameters are:
+ * 
+ *   excluded from the activities view
+ *   not logged
+ *   masked out in the UI
+ * 
+ * Of those, only the first is unit-tested.
+ * 
+ * To test manually...
+ * 
+ * Configure logback to log everything at trace:
+ * 
+ * {@code
+ * 
+ * 
+ * 
+ * 
+ * 
+ * }
+ * 
+ * 
+ * Run Brooklyn with the above log configuration file:
+ * 
+ * {@code
+ * export JAVA_OPTS="-Xms256m -Xmx1g -XX:MaxPermSize=256m 
-Dlogback.configurationFile=/path/to/logback-trace.xml"
+ * ./bin/brooklyn launch --persist auto --persistenceDir 
/path/to/persistedState
+ * }
+ * 
+ * 
+ * Deploy the blueprint below:
+ * 
+ * {@code
+ * services:
+ * - type: org.apache.brooklyn.core.mgmt.internal.TestEntityWithEffectors
--- End diff --

The way I built it was to export TestEntityWithEffectors*.java as a jar 
from my IDE, and add it to ./lib/patch of a pre-installed Brooklyn. That didn't 
require adding the pom.

Which pom did you add that to? Maybe we should add something more general 
like "You'll have to ensure this is on the classpath of your brooklyn server, 
before testing". I'll update my PR accordingly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #195: Sanitize effector parameters when reporti...

2016-06-15 Thread bostko
Github user bostko commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/195#discussion_r67141981
  
--- Diff: 
core/src/test/java/org/apache/brooklyn/core/mgmt/internal/TestEntityWithEffectors.java
 ---
@@ -21,15 +21,77 @@
 import org.apache.brooklyn.api.entity.ImplementedBy;
 import org.apache.brooklyn.core.annotation.Effector;
 import org.apache.brooklyn.core.annotation.EffectorParam;
+import org.apache.brooklyn.core.effector.MethodEffector;
 import org.apache.brooklyn.core.test.entity.TestEntity;
 
+/**
+ * Entity for testing that secret effector parameters are:
+ * 
+ *   excluded from the activities view
+ *   not logged
+ *   masked out in the UI
+ * 
+ * Of those, only the first is unit-tested.
+ * 
+ * To test manually...
+ * 
+ * Configure logback to log everything at trace:
+ * 
+ * {@code
+ * 
+ * 
+ * 
+ * 
+ * 
+ * }
+ * 
+ * 
+ * Run Brooklyn with the above log configuration file:
+ * 
+ * {@code
+ * export JAVA_OPTS="-Xms256m -Xmx1g -XX:MaxPermSize=256m 
-Dlogback.configurationFile=/path/to/logback-trace.xml"
+ * ./bin/brooklyn launch --persist auto --persistenceDir 
/path/to/persistedState
+ * }
+ * 
+ * 
+ * Deploy the blueprint below:
+ * 
+ * {@code
+ * services:
+ * - type: org.apache.brooklyn.core.mgmt.internal.TestEntityWithEffectors
--- End diff --

I had to add 
```xml

org.apache.brooklyn
brooklyn-core
${project.version}
tests

```
In my maven file to use this entity.
@aledsage do you think we should this note here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #195: Sanitize effector parameters when reporti...

2016-06-10 Thread bostko
GitHub user bostko opened a pull request:

https://github.com/apache/brooklyn-server/pull/195

Sanitize effector parameters when reporting an exception



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/bostko/brooklyn-server 
effector_utils_sanitize_logs

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/brooklyn-server/pull/195.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #195


commit 3c0c8af2d591b6026945dd112f55450dbc752947
Author: Valentin Aitken 
Date:   2016-06-10T14:25:46Z

Sanitize effector parameters when reporting an exception




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---