This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[..] | |
public class RopeyTasksApplication extends WebApplication implements ILogin, | |
ILogout,INavigable { | |
[..] | |
@Override | |
public void openLoginPage() { | |
driver.get(Config.getInstance().getBaseUrl() + "user/login"); | |
findAndWaitForElement(By.id("username")); | |
} | |
[..] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="ISO-8859-1" ?> | |
<web-app> | |
<baseUrl>http://localhost:8080/</baseUrl> | |
<!-- A Java class to hold the Selenium steps to test the application in depth. Optionally required for in-depth authn/z and session management testing. --> | |
<class>net.continuumsecurity.examples.ropeytasks.RopeyTasksApplication</class> | |
<!-- Optional names of the session ID cookies for session management testing. --> | |
<sessionIds> | |
<name>JSESSIONID</name> | |
</sessionIds> | |
<!-- the default user to use when logging in to the app --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WebApplicationSteps { | |
[...] | |
public WebApplicationSteps() { | |
} | |
[..] | |
@Given("^a new browser or client instance$") | |
public void createAppForAnyClient() { | |
createApp(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@authentication | |
Feature: Authentication | |
Verify that the authentication system is robust | |
[...] | |
@cwe-319-auth | |
Scenario: Transmit authentication credentials over HTTPS | |
Given a new browser or client instance | |
And the client/browser is configured to use an intercepting proxy | |
And the proxy logs are cleared | |
When the default user logs in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[...] | |
net.continuumsecurity.junit.SecurityTest > Scenario: Transmit authentication credentials over HTTPS.Then the protocol should be HTTPS FAILED | |
java.lang.AssertionError | |
[...] | |
Report available on: /Users/.../bdd-security/build/reports/cucumber/pretty/feature-overview.html | |
[...] | |
BUILD FAILED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/continuumsecurity/bdd-security.git | |
cd bdd-security | |
./gradlew -Dcucumber.options="--tags @authentication --tags ~@skip" test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://raw.githubusercontent.com/continuumsecurity/RopeyTasks/master/ropeytasks.jar?raw=true -O ropeytasks.jar | |
java -jar ropeytasks.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException, PortletException { | |
HttpServletRequest request = PortalUtil.getOriginalServletRequest(PortalUtil.getHttpServletRequest(resourceRequest)); | |
try { | |
HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper(PortalUtil.getHttpServletRequest(resourceRequest)){ | |
@Override | |
public String getParameter(String name) { | |
if (name.equals("p_auth")) { | |
return PortalUtil.getOriginalServletRequest((HttpServletRequest) super.getRequest()).getParameter(name); | |
} |
NewerOlder