From bcfecde0c82722b5cd2076c4b5fec1b50c99139a Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 19 Dec 2012 23:32:52 +0000 Subject: [PATCH] add a secure cookie property for rememberme git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1424222 13f79535-47bb-0310-9956-ffa450edef68 --- .../redback/configuration/UserConfigurationKeys.java | 7 ++++--- .../org/apache/archiva/redback/config-defaults.properties | 3 +++ .../archiva/redback/policy/RememberMeCookieSettings.java | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/redback-configuration/src/main/java/org/apache/archiva/redback/configuration/UserConfigurationKeys.java b/redback-configuration/src/main/java/org/apache/archiva/redback/configuration/UserConfigurationKeys.java index d0af5700..18f8cc9a 100644 --- a/redback-configuration/src/main/java/org/apache/archiva/redback/configuration/UserConfigurationKeys.java +++ b/redback-configuration/src/main/java/org/apache/archiva/redback/configuration/UserConfigurationKeys.java @@ -38,7 +38,6 @@ public interface UserConfigurationKeys String PASSWORD_ENCODER = "security.policy.password.encoder"; - String EMAIL_VALIDATION_SUBJECT = "email.validation.subject"; String REMEMBER_ME_PATH = "security.rememberme.path"; @@ -47,6 +46,10 @@ public interface UserConfigurationKeys String REMEMBER_ME_ENABLED = "security.rememberme.enabled"; + String REMEMBERME_TIMEOUT = "security.rememberme.timeout"; + + String REMEMBERME_SECURE = "security.rememberme.secure"; + String SIGNON_DOMAIN = "security.signon.domain"; String SIGNON_PATH = "security.signon.path"; @@ -105,8 +108,6 @@ public interface UserConfigurationKeys String EMAIL_VALIDATION_REQUIRED = "email.validation.required"; - String REMEMBERME_TIMEOUT = "security.rememberme.timeout"; - String ALPHA_COUNT_MIN = "security.policy.password.rule.alphacount.minimum"; String ALPHA_COUNT_VIOLATION = "user.password.violation.alpha"; diff --git a/redback-configuration/src/main/resources/org/apache/archiva/redback/config-defaults.properties b/redback-configuration/src/main/resources/org/apache/archiva/redback/config-defaults.properties index 846b0b8b..26b6e8d8 100644 --- a/redback-configuration/src/main/resources/org/apache/archiva/redback/config-defaults.properties +++ b/redback-configuration/src/main/resources/org/apache/archiva/redback/config-defaults.properties @@ -72,6 +72,9 @@ email.validation.subject=Welcome security.rememberme.enabled=true # Timeout in days ( 365 days = 1 year ) security.rememberme.timeout=365 +security.rememberme.path=/ +security.rememberme.domain= +security.rememberme.secure=false # Single Sign On # Timeout in minutes diff --git a/redback-policy/src/main/java/org/apache/archiva/redback/policy/RememberMeCookieSettings.java b/redback-policy/src/main/java/org/apache/archiva/redback/policy/RememberMeCookieSettings.java index e42ca9cd..d00452ed 100644 --- a/redback-policy/src/main/java/org/apache/archiva/redback/policy/RememberMeCookieSettings.java +++ b/redback-policy/src/main/java/org/apache/archiva/redback/policy/RememberMeCookieSettings.java @@ -48,5 +48,6 @@ public class RememberMeCookieSettings this.domain = config.getString( UserConfigurationKeys.REMEMBER_ME_DOMAIN ); this.path = config.getString( UserConfigurationKeys.REMEMBER_ME_PATH ); this.enabled = config.getBoolean( UserConfigurationKeys.REMEMBER_ME_ENABLED ); + config.getBoolean( UserConfigurationKeys.REMEMBERME_SECURE ); } }