You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2021/07/22 15:14:36 UTC

[GitHub] [sling-org-apache-sling-testing-clients] klcodanr opened a new pull request #21: SLING-10649 - Adding support for impersonation

klcodanr opened a new pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21


   Credit to @YegorKozlov for the approach in #16. 
   
   Fix for [SLING-10649](https://issues.apache.org/jira/browse/SLING-10649) including allowing setting the sudo cookie. 
   
   Note - I included the package-info.java updates for the following packages which were flagged by Baseline:
   
    - org.apache.sling.testing.clients.email
    - org.apache.sling.testing.clients.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-org-apache-sling-testing-clients] dulvac commented on a change in pull request #21: SLING-10649 - Adding support for impersonation

Posted by GitBox <gi...@apache.org>.
dulvac commented on a change in pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21#discussion_r680980693



##########
File path: src/main/java/org/apache/sling/testing/clients/SlingClient.java
##########
@@ -580,6 +588,34 @@ public String getUUId(JsonNode jsonNode) throws ClientException {
         return uuidNode.getValueAsText();
     }
 
+    @Override
+    public String getUser() {
+        // get the username from the sudo cookie or default from client config
+        return getCookieStore().getCookies().stream().filter(c -> c.getName().equals(getSudoCookieName())).findFirst()
+                .map(c -> c.getValue().replace("\"", "")).orElse(super.getUser());
+    }
+
+    /**
+     * Impersonate user with the given <code>userId</code>
+     * <p>
+     * By impersonating a user SlingClient can access content from that user eye view.

Review comment:
       ```suggestion
        * By impersonating a user SlingClient can access content from the perspective of that user.
   ```
   Also, can you add a bit more info about what that means? Permissions, other session cookies (i assume not), etc?
   And something like "any subsequent requests made from this <code>SlingClient</code> will... "

##########
File path: src/main/java/org/apache/sling/testing/clients/SlingClient.java
##########
@@ -580,6 +588,34 @@ public String getUUId(JsonNode jsonNode) throws ClientException {
         return uuidNode.getValueAsText();
     }
 
+    @Override
+    public String getUser() {
+        // get the username from the sudo cookie or default from client config
+        return getCookieStore().getCookies().stream().filter(c -> c.getName().equals(getSudoCookieName())).findFirst()
+                .map(c -> c.getValue().replace("\"", "")).orElse(super.getUser());
+    }
+
+    /**
+     * Impersonate user with the given <code>userId</code>
+     * <p>
+     * By impersonating a user SlingClient can access content from that user eye view.
+     * </p>
+     *Passing a <code>null</code> will clear impersonation.
+     *
+     * @param userId   the user to impersonate. A <code>null</code> value clears impersonation
+     */
+    public SlingClient impersonate(String userId)  {
+        BasicClientCookie c = new BasicClientCookie(getSudoCookieName(), "\"" + userId + "\"");

Review comment:
       Why does this need to be in quotes?

##########
File path: src/main/java/org/apache/sling/testing/clients/SlingClient.java
##########
@@ -580,6 +588,34 @@ public String getUUId(JsonNode jsonNode) throws ClientException {
         return uuidNode.getValueAsText();
     }
 
+    @Override
+    public String getUser() {
+        // get the username from the sudo cookie or default from client config
+        return getCookieStore().getCookies().stream().filter(c -> c.getName().equals(getSudoCookieName())).findFirst()
+                .map(c -> c.getValue().replace("\"", "")).orElse(super.getUser());
+    }
+
+    /**
+     * Impersonate user with the given <code>userId</code>
+     * <p>
+     * By impersonating a user SlingClient can access content from that user eye view.
+     * </p>
+     *Passing a <code>null</code> will clear impersonation.
+     *
+     * @param userId   the user to impersonate. A <code>null</code> value clears impersonation

Review comment:
       We need to document the "-" value as well.

##########
File path: src/main/java/org/apache/sling/testing/clients/SlingClient.java
##########
@@ -580,6 +588,34 @@ public String getUUId(JsonNode jsonNode) throws ClientException {
         return uuidNode.getValueAsText();
     }
 
+    @Override
+    public String getUser() {
+        // get the username from the sudo cookie or default from client config
+        return getCookieStore().getCookies().stream().filter(c -> c.getName().equals(getSudoCookieName())).findFirst()
+                .map(c -> c.getValue().replace("\"", "")).orElse(super.getUser());
+    }
+
+    /**
+     * Impersonate user with the given <code>userId</code>
+     * <p>
+     * By impersonating a user SlingClient can access content from that user eye view.
+     * </p>
+     *Passing a <code>null</code> will clear impersonation.
+     *
+     * @param userId   the user to impersonate. A <code>null</code> value clears impersonation
+     */
+    public SlingClient impersonate(String userId)  {

Review comment:
       ```suggestion
       public SlingClient impersonate(String userId) {
   ```

##########
File path: src/main/java/org/apache/sling/testing/clients/SlingClient.java
##########
@@ -580,6 +588,34 @@ public String getUUId(JsonNode jsonNode) throws ClientException {
         return uuidNode.getValueAsText();
     }
 
+    @Override
+    public String getUser() {
+        // get the username from the sudo cookie or default from client config
+        return getCookieStore().getCookies().stream().filter(c -> c.getName().equals(getSudoCookieName())).findFirst()
+                .map(c -> c.getValue().replace("\"", "")).orElse(super.getUser());
+    }
+
+    /**
+     * Impersonate user with the given <code>userId</code>
+     * <p>
+     * By impersonating a user SlingClient can access content from that user eye view.
+     * </p>
+     *Passing a <code>null</code> will clear impersonation.
+     *
+     * @param userId   the user to impersonate. A <code>null</code> value clears impersonation
+     */
+    public SlingClient impersonate(String userId)  {
+        BasicClientCookie c = new BasicClientCookie(getSudoCookieName(), "\"" + userId + "\"");
+        c.setPath("/");
+        c.setDomain(getUrl().getHost());
+        if(userId == null || "-".equals(userId)){

Review comment:
       ```suggestion
           if (userId == null || "-".equals(userId)) {
   ```

##########
File path: src/test/java/org/apache/sling/testing/clients/SlingClientImpersonationTest.java
##########
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.sling.testing.clients;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.http.cookie.Cookie;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SlingClientImpersonationTest {
+
+    private SlingClient slingClient;
+
+    @Before
+    public void setup() throws ClientException, URISyntaxException {
+        slingClient = new SlingClient(new URI("http://localhost:8080"), "admin", "pass");
+        assertEquals("admin", slingClient.getUser());
+    }
+
+    private Cookie getSudoCookie(String cookieName) {
+        return slingClient.getCookieStore().getCookies().stream().filter(c -> c.getName().equals(cookieName)).findAny()
+                .orElse(null);
+    }
+
+    @Test
+    public void testImpersonate() throws Exception {
+
+        slingClient.impersonate("user");
+
+        assertEquals("user", slingClient.getUser());
+
+        Cookie sudoCookie = getSudoCookie("sling.sudo");
+
+        assertNotNull(sudoCookie);
+        assertEquals("\"user\"", sudoCookie.getValue());
+    }
+
+    @Test
+    public void testUndoImpersonation() throws Exception {
+
+        slingClient.impersonate("user");
+
+        assertEquals("user", slingClient.getUser());
+
+        slingClient.impersonate("-");

Review comment:
       Do we really need this mechanic? Shouldn't we just add a "clearImpersonation" method that has a proper API?

##########
File path: src/test/java/org/apache/sling/testing/clients/SlingClientImpersonationTest.java
##########
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.sling.testing.clients;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.http.cookie.Cookie;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SlingClientImpersonationTest {
+
+    private SlingClient slingClient;
+
+    @Before
+    public void setup() throws ClientException, URISyntaxException {
+        slingClient = new SlingClient(new URI("http://localhost:8080"), "admin", "pass");
+        assertEquals("admin", slingClient.getUser());
+    }
+
+    private Cookie getSudoCookie(String cookieName) {
+        return slingClient.getCookieStore().getCookies().stream().filter(c -> c.getName().equals(cookieName)).findAny()
+                .orElse(null);
+    }
+
+    @Test
+    public void testImpersonate() throws Exception {
+
+        slingClient.impersonate("user");
+
+        assertEquals("user", slingClient.getUser());
+
+        Cookie sudoCookie = getSudoCookie("sling.sudo");
+
+        assertNotNull(sudoCookie);
+        assertEquals("\"user\"", sudoCookie.getValue());
+    }
+
+    @Test
+    public void testUndoImpersonation() throws Exception {
+
+        slingClient.impersonate("user");
+
+        assertEquals("user", slingClient.getUser());
+
+        slingClient.impersonate("-");
+        assertEquals("admin", slingClient.getUser());
+
+        Cookie sudoCookie = getSudoCookie("sling.sudo");
+
+        assertNull(sudoCookie);
+    }
+
+    @Test
+    public void testNullImpersonation() throws Exception {
+
+        slingClient.impersonate("user");
+
+        assertEquals("user", slingClient.getUser());
+
+        slingClient.impersonate(null);
+        assertEquals("admin", slingClient.getUser());
+
+        Cookie sudoCookie = getSudoCookie("sling.sudo");
+
+        assertNull(sudoCookie);
+    }
+
+    @Test
+    public void testDifferentSudoCookie() throws Exception {
+        String sudoCookieName = "sudo.make.me.a.sandwich";
+
+        slingClient.addValue(SlingClient.SUDO_COOKIE_NAME, sudoCookieName);

Review comment:
       nice use of the `addValue` method

##########
File path: src/main/java/org/apache/sling/testing/clients/SlingClient.java
##########
@@ -543,6 +547,10 @@ public SlingHttpResponse importJson(String parentPath, JsonNode json, int... exp
         return importContent(parentPath, "json", json.toString(), expectedStatus);
     }
 
+    private String getSudoCookieName() {
+        return Optional.ofNullable(this.getValue(SUDO_COOKIE_NAME)).orElse("sling.sudo");

Review comment:
       💯 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-org-apache-sling-testing-clients] klcodanr commented on a change in pull request #21: SLING-10649 - Adding support for impersonation

Posted by GitBox <gi...@apache.org>.
klcodanr commented on a change in pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21#discussion_r683744467



##########
File path: src/main/java/org/apache/sling/testing/clients/SlingClient.java
##########
@@ -580,6 +588,34 @@ public String getUUId(JsonNode jsonNode) throws ClientException {
         return uuidNode.getValueAsText();
     }
 
+    @Override
+    public String getUser() {
+        // get the username from the sudo cookie or default from client config
+        return getCookieStore().getCookies().stream().filter(c -> c.getName().equals(getSudoCookieName())).findFirst()
+                .map(c -> c.getValue().replace("\"", "")).orElse(super.getUser());
+    }
+
+    /**
+     * Impersonate user with the given <code>userId</code>
+     * <p>
+     * By impersonating a user SlingClient can access content from that user eye view.
+     * </p>
+     *Passing a <code>null</code> will clear impersonation.
+     *
+     * @param userId   the user to impersonate. A <code>null</code> value clears impersonation

Review comment:
       Removed the ability and added endImpersonation method.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-org-apache-sling-testing-clients] sonarcloud[bot] removed a comment on pull request #21: SLING-10649 - Adding support for impersonation

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21#issuecomment-885001505


   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; ![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL)
   
   [![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-org-apache-sling-testing-clients] sonarcloud[bot] removed a comment on pull request #21: SLING-10649 - Adding support for impersonation

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21#issuecomment-893706555


   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; ![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL)
   
   [![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-org-apache-sling-testing-clients] sonarcloud[bot] commented on pull request #21: SLING-10649 - Adding support for impersonation

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21#issuecomment-885001505


   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; ![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL)
   
   [![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-org-apache-sling-testing-clients] klcodanr commented on a change in pull request #21: SLING-10649 - Adding support for impersonation

Posted by GitBox <gi...@apache.org>.
klcodanr commented on a change in pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21#discussion_r683744278



##########
File path: src/test/java/org/apache/sling/testing/clients/SlingClientImpersonationTest.java
##########
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.sling.testing.clients;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.http.cookie.Cookie;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SlingClientImpersonationTest {
+
+    private SlingClient slingClient;
+
+    @Before
+    public void setup() throws ClientException, URISyntaxException {
+        slingClient = new SlingClient(new URI("http://localhost:8080"), "admin", "pass");
+        assertEquals("admin", slingClient.getUser());
+    }
+
+    private Cookie getSudoCookie(String cookieName) {
+        return slingClient.getCookieStore().getCookies().stream().filter(c -> c.getName().equals(cookieName)).findAny()
+                .orElse(null);
+    }
+
+    @Test
+    public void testImpersonate() throws Exception {
+
+        slingClient.impersonate("user");
+
+        assertEquals("user", slingClient.getUser());
+
+        Cookie sudoCookie = getSudoCookie("sling.sudo");
+
+        assertNotNull(sudoCookie);
+        assertEquals("\"user\"", sudoCookie.getValue());
+    }
+
+    @Test
+    public void testUndoImpersonation() throws Exception {
+
+        slingClient.impersonate("user");
+
+        assertEquals("user", slingClient.getUser());
+
+        slingClient.impersonate("-");

Review comment:
       Good point, removed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-org-apache-sling-testing-clients] sonarcloud[bot] commented on pull request #21: SLING-10649 - Adding support for impersonation

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21#issuecomment-893706555


   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; ![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL)
   
   [![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-org-apache-sling-testing-clients] sonarcloud[bot] removed a comment on pull request #21: SLING-10649 - Adding support for impersonation

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21#issuecomment-893707246


   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; ![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL)
   
   [![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-org-apache-sling-testing-clients] klcodanr merged pull request #21: SLING-10649 - Adding support for impersonation

Posted by GitBox <gi...@apache.org>.
klcodanr merged pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-org-apache-sling-testing-clients] sonarcloud[bot] commented on pull request #21: SLING-10649 - Adding support for impersonation

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21#issuecomment-893707246


   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; ![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL)
   
   [![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-org-apache-sling-testing-clients] sonarcloud[bot] commented on pull request #21: SLING-10649 - Adding support for impersonation

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/21#issuecomment-893759854


   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; ![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&resolved=false&types=CODE_SMELL)
   
   [![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=21&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org