You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Simeó Reig <si...@grupoincofisa.com> on 2017/02/23 17:43:31 UTC
Each redeploy deletes RememberMe Cookies
How can we avoid to shiro removes all rememberMe cookies on each
redeploy?
We have implemented a custom realm, we thougth it was because we haven't
setted serialVersionUID in oir User pojo, but neither work with it
Thanks again
Simeo Reig
Shiro.ini
[main]
authc.loginUrl = /login
user.loginUrl = /login
adronicaRealm = com.mycompany.shirofaces.AdronicaRealm
authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter
securityManager.rememberMeManager.cookie.name = shiroTest
securityManager.realms = $adronicaRealm
[roles]
admin = *
user = usuaris:* , ventes:edicio, ventes:delete
user_grant = ventes:canvi
[urls]
/ = anon
/welcome = anon
/login = user
/admin/** = user
Re: Each redeploy deletes RememberMe Cookies
Posted by Simeó Reig <si...@grupoincofisa.com>.
Many many Thanks Rob, what an amazing community
Thanks Again
Sime� Reig
> Hey, I can actually help with one of these q's! :)
>
> Look in the documentation for the cipherKey property, you need to set it or it gets regenerated each deploy. I can't remember what format it needs, but it needs to be a fairly specific format.
>
> securityManager.rememberMeManager.cipherKey = <your key here>
>
> On Thu, Feb 23, 2017 at 12:43 PM, Sime� Reig <si...@grupoincofisa.com> wrote:
>
>> How can we avoid to shiro removes all rememberMe cookies on each redeploy?
>>
>> We have implemented a custom realm, we thougth it was because we haven't setted serialVersionUID in oir User pojo, but neither work with it
>>
>> Thanks again
>>
>> Simeo Reig
>>
>> Shiro.ini
>>
>> [main]
>> authc.loginUrl = /login
>> user.loginUrl = /login
>>
>> adronicaRealm = com.mycompany.shirofaces.AdronicaRealm
>>
>> authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter
>> securityManager.rememberMeManager.cookie.name [1] = shiroTest
>> securityManager.realms = $adronicaRealm
>>
>> [roles]
>> admin = *
>> user = usuaris:* , ventes:edicio, ventes:delete
>> user_grant = ventes:canvi
>>
>> [urls]
>> / = anon
>> /welcome = anon
>> /login = user
>> /admin/** = user
Links:
------
[1] http://securityManager.rememberMeManager.cookie.name
Re: Each redeploy deletes RememberMe Cookies
Posted by Rob Young <bo...@gmail.com>.
Hey, I can actually help with one of these q's! :)
Look in the documentation for the cipherKey property, you need to set it or
it gets regenerated each deploy. I can't remember what format it needs,
but it needs to be a fairly specific format.
securityManager.rememberMeManager.cipherKey = <your key here>
On Thu, Feb 23, 2017 at 12:43 PM, Simeó Reig <si...@grupoincofisa.com>
wrote:
> How can we avoid to shiro removes all rememberMe cookies on each redeploy?
>
> We have implemented a custom realm, we thougth it was because we haven't
> setted serialVersionUID in oir User pojo, but neither work with it
>
> Thanks again
>
> Simeo Reig
>
>
> Shiro.ini
>
> [main]
> authc.loginUrl = /login
> user.loginUrl = /login
>
> adronicaRealm = com.mycompany.shirofaces.AdronicaRealm
>
> authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter
> securityManager.rememberMeManager.cookie.name = shiroTest
> securityManager.realms = $adronicaRealm
>
> [roles]
> admin = *
> user = usuaris:* , ventes:edicio, ventes:delete
> user_grant = ventes:canvi
>
> [urls]
> / = anon
> /welcome = anon
> /login = user
> /admin/** = user
>
>
>
>
>
>
Re: Each redeploy deletes RememberMe Cookies
Posted by Simeó Reig <si...@grupoincofisa.com>.
Many many Thanks Brian, really an amazing community
Thanks Again
Sime� Reig
A 23-02-2017 19:33, Brian Demers escrigu�:
> Set `securityManager.rememberMeManager.cipherKey` to a unique (and private) value: https://shiro.apache.org/configuration.html#byte-array-values
>
> On Thu, Feb 23, 2017 at 12:43 PM, Sime� Reig <si...@grupoincofisa.com> wrote:
>
>> How can we avoid to shiro removes all rememberMe cookies on each redeploy?
>>
>> We have implemented a custom realm, we thougth it was because we haven't setted serialVersionUID in oir User pojo, but neither work with it
>>
>> Thanks again
>>
>> Simeo Reig
>>
>> Shiro.ini
>>
>> [main]
>> authc.loginUrl = /login
>> user.loginUrl = /login
>>
>> adronicaRealm = com.mycompany.shirofaces.AdronicaRealm
>>
>> authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter
>> securityManager.rememberMeManager.cookie.name [1] = shiroTest
>> securityManager.realms = $adronicaRealm
>>
>> [roles]
>> admin = *
>> user = usuaris:* , ventes:edicio, ventes:delete
>> user_grant = ventes:canvi
>>
>> [urls]
>> / = anon
>> /welcome = anon
>> /login = user
>> /admin/** = user
Links:
------
[1] http://securityManager.rememberMeManager.cookie.name
Re: Each redeploy deletes RememberMe Cookies
Posted by Brian Demers <br...@gmail.com>.
Set `securityManager.rememberMeManager.cipherKey` to a unique (and private)
value:
https://shiro.apache.org/configuration.html#byte-array-values
On Thu, Feb 23, 2017 at 12:43 PM, Simeó Reig <si...@grupoincofisa.com>
wrote:
> How can we avoid to shiro removes all rememberMe cookies on each redeploy?
>
> We have implemented a custom realm, we thougth it was because we haven't
> setted serialVersionUID in oir User pojo, but neither work with it
>
> Thanks again
>
> Simeo Reig
>
>
> Shiro.ini
>
> [main]
> authc.loginUrl = /login
> user.loginUrl = /login
>
> adronicaRealm = com.mycompany.shirofaces.AdronicaRealm
>
> authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter
> securityManager.rememberMeManager.cookie.name = shiroTest
> securityManager.realms = $adronicaRealm
>
> [roles]
> admin = *
> user = usuaris:* , ventes:edicio, ventes:delete
> user_grant = ventes:canvi
>
> [urls]
> / = anon
> /welcome = anon
> /login = user
> /admin/** = user
>
>
>
>
>
>