Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve EPP session management #700

Closed
artur-intech opened this issue Feb 6, 2018 · 8 comments
Closed

Improve EPP session management #700

artur-intech opened this issue Feb 6, 2018 · 8 comments

Comments

@artur-intech
Copy link
Contributor

artur-intech commented Feb 6, 2018

  • Add database constraints
  • Refactor EPPSession model, EPP::SessionsController, EppController
  • Refactor database structure
  • Add basic EPP login/logout tests
@artur-intech artur-intech self-assigned this Feb 6, 2018
artur-intech pushed a commit that referenced this issue Feb 6, 2018
artur-intech pushed a commit that referenced this issue Feb 6, 2018
artur-intech pushed a commit that referenced this issue Feb 6, 2018
artur-intech pushed a commit that referenced this issue Feb 6, 2018
artur-intech pushed a commit that referenced this issue Feb 6, 2018
epp_session.session_id is always present

#700
artur-intech pushed a commit that referenced this issue Feb 6, 2018
artur-intech pushed a commit that referenced this issue Feb 7, 2018
artur-intech pushed a commit that referenced this issue Feb 7, 2018
artur-intech pushed a commit that referenced this issue Feb 7, 2018
artur-intech pushed a commit that referenced this issue Feb 7, 2018
artur-intech pushed a commit that referenced this issue Feb 7, 2018
artur-intech pushed a commit that referenced this issue Feb 7, 2018
artur-intech pushed a commit that referenced this issue Feb 7, 2018
artur-intech pushed a commit that referenced this issue Feb 7, 2018
artur-intech pushed a commit that referenced this issue Feb 12, 2018
Registrar can be queried from user

#700
artur-intech pushed a commit that referenced this issue Feb 12, 2018
artur-intech pushed a commit that referenced this issue Feb 12, 2018
@teadur
Copy link
Contributor

teadur commented Feb 13, 2018

Please consider env['HTTP_COOKIE'] as session source if cookies doesnot give any extra value.

artur-intech pushed a commit that referenced this issue Feb 13, 2018
artur-intech pushed a commit that referenced this issue Feb 13, 2018
artur-intech pushed a commit that referenced this issue Feb 13, 2018
@artur-intech
Copy link
Contributor Author

artur-intech commented Feb 13, 2018

@vohmar @ratM1n Special attention to db/migrate/20180207071528_extract_user_id_from_epp_sessions_data.rb It extracts user id from serialised data attribute. Double check that it converts existing data correctly (on staging, test-reg).

Marshal.load(::Base64.decode64(EppSession.first.data_before_type_cast))[:api_user_id] in rails c allows to see actual contents of #data, where EppSession.first is the session in question.

Take into account that after all migrations run, there will be no data and registrar_id anymore.

artur-intech pushed a commit that referenced this issue Feb 13, 2018
artur-intech pushed a commit that referenced this issue Feb 13, 2018
Having session_id constraints at the database level is crucial

#700
artur-intech pushed a commit that referenced this issue Feb 13, 2018
artur-intech pushed a commit that referenced this issue Feb 14, 2018
@artur-intech artur-intech changed the title Improve EPP session model validation and DB constraints Improve EPP session management Feb 14, 2018
artur-intech pushed a commit that referenced this issue Feb 14, 2018
artur-intech pushed a commit that referenced this issue Feb 14, 2018
@artur-intech
Copy link
Contributor Author

artur-intech commented Feb 14, 2018

Test:

  • EPP login/logout
  • EPP session limit
  • EPP logs in admin

Multiple users from different registrars must exist.

artur-intech pushed a commit that referenced this issue Feb 14, 2018
artur-intech pushed a commit that referenced this issue Feb 14, 2018
artur-intech pushed a commit that referenced this issue Feb 14, 2018
@artur-intech artur-intech assigned vohmar and unassigned artur-intech Feb 14, 2018
@vohmar
Copy link
Contributor

vohmar commented Feb 19, 2018

  • session limit does not work - successfully created 10 simultaneous sessions under a single registrar

  • epp login/logout works
  • epp logs in admin seem OK

@vohmar vohmar assigned artur-intech and unassigned vohmar Feb 19, 2018
@artur-intech
Copy link
Contributor Author

How can I reproduce № 1?

@artur-intech
Copy link
Contributor Author

artur-intech commented Feb 19, 2018

As far as I remember, we decided to postpone this issue anyway. Probably #711 should be done first. Otherwise nobody is allowed to login.

@teadur
Copy link
Contributor

teadur commented Feb 19, 2018

So the #710 shouldnot be reviewed before #711 is finished ?

@teadur teadur added the blocked label Feb 19, 2018
@teadur teadur mentioned this issue Feb 19, 2018
@artur-intech
Copy link
Contributor Author

@teadur That's up to @vohmar to decide. By "Test EPP session limit" I meant that exactly the same behaviour as in master branch should remain in place. I only did some refactoring concerning that part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants