The DMZ

A serious place where infosec is discussed PS we don't do hard...
Sam
Oct 4, 2018 10:19
Morning guys
Sam
Oct 3, 2018 14:14
Please don't say I shouldn't make my own end points... otherwise I'd be writing 0 code haha
Sam
Oct 3, 2018 14:14
OK so the idea is... use an oauth server for authentication... then just protect my own endpoints using their decorators i guess?
Sam
Oct 3, 2018 14:09
Sold guys. Sold
Sam
Oct 3, 2018 14:09
Sam
Oct 3, 2018 14:04
I'm not building my own algorithms if this is what you mean.
Sam
Oct 3, 2018 14:04
My own Crypto?
Sam
Oct 3, 2018 14:03
ATM its just a project... if i were to release it, I'd switch the auth module to OAuth or similar.
Sam
Oct 3, 2018 13:47
Yeah I take your advice
Sam
Oct 3, 2018 13:46
This guy has a similar imp to mine github.com/karec/cookiecutter-flask-restful
Sam
Oct 3, 2018 13:45
lol
Sam
Oct 3, 2018 13:45
Tom you need to let me spread my wings.
Sam
Oct 3, 2018 13:44
It will be called samAuth
Sam
Oct 3, 2018 13:44
I shall construct my own
Sam
Oct 3, 2018 13:43
Django is too bulky.
Sam
Oct 3, 2018 13:43
I've seen many implementations with flask-jwt-extended so hopefully I'll be able to stick in on code review to get some feedback on my implementation.
Sam
Oct 3, 2018 13:42
Meh - I don't want to use Django. Doesn't fit my needs.
Sam
Oct 3, 2018 13:41
I know :P
Sam
Oct 3, 2018 13:40
lol
Sam
Oct 3, 2018 13:40
Nope, not an insult
Sam
Oct 3, 2018 13:40
@J.J Cut down and turned into an A4 booklet I believe.
Sam
Oct 3, 2018 13:39
Maybe once I'm done I'll offer money on a Reddit post for users to issue a security report :P
Sam
Oct 3, 2018 13:38
I'm going to stick with my own imp for the time being.
Sam
Oct 3, 2018 13:38
Damn. OAuth costs!
Sam
Oct 3, 2018 13:37
So you advice I use oauth?
Sam
Oct 3, 2018 13:35
Also, aren't there ways you can test the security of your website? I'm pretty sure I seen a web service which grades your site against a number of different attacks.
Sam
Oct 3, 2018 13:35
It's more fun to implement it myself. When going into production, I will consider switching. It shouldn't be too difficult to switch the auth module anyways. Plus its good to learnn
Sam
Oct 3, 2018 13:22
I'm using flask-jwt-extended.readthedocs.io/en/latest to do all the heavy pulling.
Sam
Oct 3, 2018 13:22
I mean, I'm only making my own end points.. I'm still using a JWT library.
Sam
Oct 3, 2018 13:21
But that's no fun!
Sam
Oct 3, 2018 12:31
I guess my implementation is kinda the same
Sam
Oct 3, 2018 12:28
> The API first validates the application credentials and then verifies whether the token was issued to the application making the revocation request. If this validation fails, the request is refused and the application is informed of the error. Next, the API invalidates the token.
Sam
Oct 3, 2018 12:27
I'm reading through the docs now.
Sam
Oct 3, 2018 12:27
Ah wait... I think it might
Sam
Oct 3, 2018 12:20
Not entirely.
Sam
Oct 3, 2018 12:02
@TomK. I've seen oath.. they probably do something similar. But I don't really want to use it. Seems quite heavy.
Sam
Oct 3, 2018 10:35
Hello btw o/
Sam
Oct 3, 2018 10:34
I've asked a question if any of you people are knowledgeable in the area security.stackexchange.com/questions/194774/…;.
Sam
Sep 29, 2018 20:00
Hashing and persisting the refresh tokens using my applications secret key
Sam
Sep 29, 2018 16:32
@BenoitEsnard I figured out how to properly secure the token.
Sam
Sep 29, 2018 12:03
Also, in my logout endpoint, should I blacklist both access and refresh tokens @BenoitEsnard?
Sam
Sep 29, 2018 11:57
I still feel I should have some additional layer.. like a user refresh token storage
Sam
Sep 29, 2018 11:56
@BenoitEsnard Famous last words :p
Sam
Sep 29, 2018 11:55
So how would one ensure against this?
Sam
Sep 29, 2018 11:54
OK but suppose the attacker obtains the refresh token and it hasn't been revoked. There is no logic to say revoke this token as we do not know its been compromised
Sam
Sep 29, 2018 11:53
Thats where I think storing the refresh tokens along with the user would come in handy
Sam
Sep 29, 2018 11:52
@BenoitEsnard Yeah exactly
Sam
Sep 29, 2018 11:51
In what instances would a refresh token be revoked?
Sam
Sep 29, 2018 11:50
by using the above model, if an attacker gets hold of a refresh token, they'd also need to be logged in as the user who the refresh token belongs to
Sam
Sep 29, 2018 11:50
Yeh?