Skip to content

Commit

Permalink
Merge pull request #994 from daniel-beck/dont-remember-me
Browse files Browse the repository at this point in the history
[JENKINS-15757] Ignore 'remember me' if disabled in configuration
Originally-Committed-As: dec369e68eab3cfdcadf4c9660d174a1106e23a9
  • Loading branch information
stephenc committed Nov 6, 2013
2 parents 434d1bc + 5b0d293 commit 81bffe2
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
Expand Up @@ -62,6 +62,8 @@ enum DataSet {
* and any logged in user has a full access.
*/
ANONYMOUS_READONLY,

SECURED_ACEGI,
}

class RunnerImpl extends Recipe.Runner<PresetData> {
Expand Down
16 changes: 16 additions & 0 deletions test/src/main/preset-data/secured-acegi/config.xml
@@ -0,0 +1,16 @@
<?xml version='1.0' encoding='UTF-8'?>
<hudson>
<numExecutors>2</numExecutors>
<mode>NORMAL</mode>
<useSecurity>true</useSecurity>
<authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy"/>
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
<disableSignup>true</disableSignup>
<enableCaptcha>false</enableCaptcha>
</securityRealm>
<jdks/>
<slaves/>
<quietPeriod>5</quietPeriod>
<slaveAgentPort>0</slaveAgentPort>
<secretKey>ed2e66995bec739c0ec71c260bd75be6918ff28b0f1b33d67e205297629a6264</secretKey>
</hudson>
3 changes: 3 additions & 0 deletions test/src/main/preset-data/secured-acegi/readme.txt
@@ -0,0 +1,3 @@
Anonymous users have no permissions, logged in users can do anything.

Uses Jenkins user database, because 'Remember me' functionality requires non-legacy security realm to be enabled.
29 changes: 29 additions & 0 deletions test/src/main/preset-data/secured-acegi/users/alice/config.xml
@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8'?>
<user>
<fullName>Alice</fullName>
<properties>
<jenkins.security.ApiTokenProperty>
<apiToken>0K7w+E0Bi/rJt1lombWFDYtw0/KLFHwBjJqN8tUd2QO4tzVXKCPuIq2uWlTUdeBd</apiToken>
</jenkins.security.ApiTokenProperty>
<hudson.model.MyViewsProperty>
<views>
<hudson.model.AllView>
<owner class="hudson.model.MyViewsProperty" reference="../../.."/>
<name>All</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
<properties class="hudson.model.View$PropertyList"/>
</hudson.model.AllView>
</views>
</hudson.model.MyViewsProperty>
<hudson.search.UserSearchProperty>
<insensitiveSearch>false</insensitiveSearch>
</hudson.search.UserSearchProperty>
<hudson.security.HudsonPrivateSecurityRealm_-Details>
<passwordHash>#jbcrypt:$2a$10$9m4niaJ3tOglIM22Yd.LdOwuU9RcD9FpuXlqlJhQHKt5Qx2mh.2/i</passwordHash>
</hudson.security.HudsonPrivateSecurityRealm_-Details>
<hudson.tasks.Mailer_-UserProperty plugin="mailer@1.5">
<emailAddress>alice@example.org</emailAddress>
</hudson.tasks.Mailer_-UserProperty>
</properties>
</user>

0 comments on commit 81bffe2

Please sign in to comment.