[akka-user] AkkaHttp and OAuth2 authorization code flow (logical http session? on cassandra?)

2018-01-10 Thread Nicolae Marasoiu
Hi,
We need to implement OAuth2 authorization code flow in an AkkaHttp 
microservice.
The way that I know it traditionally works needs a logical session managed 
with a cookie or similar: the microservice does the flow, obtains the 
access/refresh tokens and caches the tokens for future use until they need 
to be re-emitted due to expiration approaching.
This logical session would be in cassandra ideally for us, to enable 
scalability. I guess this is why the http session is no longer offered by 
AkkaHttp itself, but there are separate authors offering http session 
implementations for AkkaHttp.
As a background where I am coming from, in a Servlet/Spring environment, at 
one time Spring-Session offered support to transparently store session in 
certain dbs.
The only alternative I see is to manually manage a cookie from my code and 
work with Cassandra. I can check how a cookie like the traditional 
JSESSIONID is configured (e.g. HttpOnly).
The second alternative is to go to authorization server every request and 
it will issue new tokens, or offered a cached version of them if it does, 
but seems overkill.
Please advise how would you do, what alternatives do you see,
Thanks,
Nicu Marasoiu

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Disable Durable Storage for DData

2018-01-10 Thread Patrik Nordwall
Durable storage is used by Cluster Sharding for rememberEntites so that it
can "remember" things after a full cluster restart, i.e. activate the same
entities again.

In 2.5 the ddata mode became default in Cluster Sharding. If you want the
old behavior you should enable the "persistence" mode.
https://doc.akka.io/docs/akka/current/cluster-sharding.html#distributed-data-vs-persistence-mode

rememberEntites with ddata mode in 2.4 didn't really work.

See also migration guide:
https://doc.akka.io/docs/akka/current/project/migration-guide-2.4.x-2.5.x.html#cluster-sharding-state-store-mode

/Patrik

On Wed, Jan 10, 2018 at 9:10 AM, haghard  wrote:

> Do you think that this folder somehow relates to rememberEntities
>
> среда, 10 января 2018 г., 0:13:26 UTC+3 пользователь haghard написал:
>
>> yes
>>
>> среда, 10 января 2018 г., 0:12:30 UTC+3 пользователь Patrik Nordwall
>> написал:
>>>
>>> Are you using Cluster Sharding with rememberEntities?
>>> tis 9 jan. 2018 kl. 21:52 skrev haghard :
>>>
 Hello Patrik, after updating on 2.5.8 I see a new folder called ddata.

 Thanks

 вторник, 9 января 2018 г., 22:52:36 UTC+3 пользователь Patrik Nordwall
 написал:
>
> Could you give some more context. It's not active by default.
>
> /Patrik
>
 On Tue, Jan 9, 2018 at 7:02 PM, haghard  wrote:
>
 Hello hakkers,
>>   Is it possible to disable durable storage for DData in aka 2.5.x
>> and get back previous behaviour ?
>>
>> Thanks
>>
> --
>> >> Read the docs: http://akka.io/docs/
>> >> Check the FAQ: http://doc.akka.io/docs/akka/c
>> urrent/additional/faq.html
>> >> Search the archives: https://groups.google.com/grou
>> p/akka-user
>> ---
>> You received this message because you are subscribed to the Google
>> Groups "Akka User List" group.
>>
> To unsubscribe from this group and stop receiving emails from it, send
>> an email to akka-user+...@googlegroups.com.
>> To post to this group, send email to akka...@googlegroups.com.
>
>
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> Patrik Nordwall
> Akka Tech Lead
> Lightbend  -  Reactive apps on the JVM
> Twitter: @patriknw
>
> --
 >> Read the docs: http://akka.io/docs/
 >> Check the FAQ: http://doc.akka.io/docs/akka/c
 urrent/additional/faq.html
 >> Search the archives: https://groups.google.com/grou
 p/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups "Akka User List" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to akka-user+...@googlegroups.com.
 To post to this group, send email to akka...@googlegroups.com.
 Visit this group at https://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.

>>> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ: http://doc.akka.io/docs/akka/
> current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Patrik Nordwall
Akka Tech Lead
Lightbend  -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Disable Durable Storage for DData

2018-01-10 Thread haghard
Do you think that this folder somehow relates to rememberEntities

среда, 10 января 2018 г., 0:13:26 UTC+3 пользователь haghard написал:
>
> yes
>
> среда, 10 января 2018 г., 0:12:30 UTC+3 пользователь Patrik Nordwall 
> написал:
>>
>> Are you using Cluster Sharding with rememberEntities?
>> tis 9 jan. 2018 kl. 21:52 skrev haghard :
>>
>>> Hello Patrik, after updating on 2.5.8 I see a new folder called ddata.
>>>
>>> Thanks
>>>
>>> вторник, 9 января 2018 г., 22:52:36 UTC+3 пользователь Patrik Nordwall 
>>> написал:

 Could you give some more context. It's not active by default.

 /Patrik

>>> On Tue, Jan 9, 2018 at 7:02 PM, haghard  wrote:

>>> Hello hakkers,
>   Is it possible to disable durable storage for DData in aka 2.5.x and 
> get back previous behaviour ?
>
> Thanks
>
 -- 
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ: 
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >> Search the archives: 
> https://groups.google.com/group/akka-user
> --- 
> You received this message because you are subscribed to the Google 
> Groups "Akka User List" group.
>
 To unsubscribe from this group and stop receiving emails from it, send 
> an email to akka-user+...@googlegroups.com.
> To post to this group, send email to akka...@googlegroups.com.


> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



 -- 

 Patrik Nordwall
 Akka Tech Lead
 Lightbend  -  Reactive apps on the JVM
 Twitter: @patriknw

 -- 
>>> >> Read the docs: http://akka.io/docs/
>>> >> Check the FAQ: 
>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>> >> Search the archives: 
>>> https://groups.google.com/group/akka-user
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to akka-user+...@googlegroups.com.
>>> To post to this group, send email to akka...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.