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

First time signup and login problems #3

Closed
Bjarke42 opened this issue Feb 17, 2023 · 5 comments
Closed

First time signup and login problems #3

Bjarke42 opened this issue Feb 17, 2023 · 5 comments
Labels
invalid This doesn't seem right

Comments

@Bjarke42
Copy link

When I'm a new user, never signed up nor logged in, using a new cleared browser press login instead of signup the first time, I will not be able to press signup afterwards and be signed up.

Instead it fails and and as a fix I will have to clear my browser. Then first press signup followed by login to gain access to ERDA.

I believe this is related to autologout not solving the problem.

Please fix this so that users who press login before they are signed up will not have to know about clearing the browser. This might cause confusion.

@jonasbardino
Copy link
Contributor

Thanks. Can you please provide a few more details about what exactly happens when you do try to sign up after such a log in. Including what happens if you follow the instructions given on any resulting error page. This is where autologout.py should kick in to break the partially logged in cookie-stalemate.

As hinted in another context the underlying issue can hopefully be eliminated once we finish OpenID Connect integration, because that auth method always carries the necessary ID token to identify and create missing users on-demand.

@jonasbardino
Copy link
Contributor

Please check if the February 27th commits to edge (ce2d190) and experimental (7ca6975) fixed the issue. I.e. check if it's still a problem with any later version.

@Bjarke42
Copy link
Author

I have tested this for a user that is not existing in the system. First do a login, which progresses normal until it finds that the person is not in the system. The try signup that fails as it does before.

mig log entries:
2023-03-27 13:36:48,222 WARNING fall back to twofactor defaults for code1 2023-03-27 13:36:48,223 INFO no 2FA requirement for code1 on /wsgi-bin/twofactor.py?redirect_url=/wsgi-bin/autolaunch.py 2023-03-27 13:36:48,226 INFO saved 2FA session for code1 in code2 2023-03-27 13:36:48,263 WARNING possibly missing logout for client_id code1 on au.dk 2023-03-27 13:36:55,517 WARNING possibly missing logout for client_id code1 on au.dk 2023-03-27 13:36:57,047 WARNING possibly missing logout for client_id code1 on au.dk 2023-03-27 13:37:11,077 WARNING possibly missing logout for client_id code1 on au.dk 2023-03-27 13:37:15,940 ERROR /home/mig/state/user_settings/code1/settings could not be opened/unpickled! [Errno 2] No such file or directory: '/home/mig/state/user_settings/code1/settings' 2023-03-27 13:37:15,941 INFO autocreate: args: {'openid.ns': ['http://specs.openid.net/auth/2.0'], 'openid.ns.sreg': ['http://openid.net/extensions/sreg/1.1'], 'openid.sreg.required': ['nickname,fullname,email,o,ou,country,state,role']} 2023-03-27 13:37:15,977 WARNING autocreate from code1 got invalid input: [{'object_type': 'start', 'headers': []}, {'object_type': 'title', 'text': 'autocreate', 'meta': '', 'style': {'base': '\n<link rel="stylesheet" type="text/css" href="/assets/vendor/jquery-ui/css/jquery-ui.css" media="screen"/>\n', 'ui_base': '\n<!-- User interface version-specific setup -->\n<link rel="stylesheet" href="/assets/vendor/bootstrap/css/bootstrap.min.css">\n<link rel="stylesheet" href="/assets/vendor/fontawesome/css/all.css"> <!--load all styles -->\n\n<!-- UI V3 CSS -->\n<link rel="stylesheet" href="/assets/css/V3/ui.css">\n<link rel="stylesheet" href="/assets/css/V3/style.css">\n<link rel="stylesheet" href="/assets/css/V3/nav.css">\n ', 'advanced': '\n<link rel="stylesheet" type="text/css" href="/assets/css/V3/jquery.managers.css" media="screen"/>\n ', 'skin': '\n<link rel="stylesheet" type="text/css" href="/assets/skin/erda-ucph-science/core.css" media="screen"/>\n<link rel="stylesheet" type="text/css" href="/assets/skin/erda-ucph-science/managers.css" media="screen"/>\n<link rel="stylesheet" type="text/css" href="/assets/skin/erda-ucph-science/ui-theme.css" media="screen"/>\n<link rel="stylesheet" type="text/css" href="/assets/skin/erda-ucph-science/ui-theme.custom.css" media="screen"/>\n', 'ui_skin': '\n<!-- UI V3-only skin overrides -->\n<link rel="stylesheet" type="text/css" href="/assets/skin/erda-ucph-science/ui-v3.custom.css" media="screen"/>\n ', 'site_extra': ''}, 'script': {'base': '\n<script type="text/javascript" src="/assets/vendor/jquery/js/jquery.js"></script>\n \n\n<script src="/assets/vendor/jquery/js/popper.js"></script>\n<script src="/assets/vendor/jquery/js/jquery.validate.min.js"></script>\n ', 'advanced': '', 'skin': '\n<script type="text/javascript" src="/assets/vendor/jquery-ui/js/jquery-ui.js"></script>\n \n\n<!-- UI V3 JS -->\n<script src="/assets/vendor/bootstrap/js/bootstrap.min.js"></script>\n<script src="/assets/js/V3/ui-global.js"></script>\n<script src="/assets/js/V3/ui-extra.js"></script>\n<script src="/assets/js/V3/ui-dynamic.js"></script>\n ', 'init': '\n/* default console log verbosity defined here - change before calling init_log\nto override. */\nvar log_level = "info";\nvar all_log_levels = {"none": 0, "error": 1, "warn": 2, "info": 3, "debug": 4};\n/*\n Make sure we can always use console.X without scripts crashing. IE<=9\n does not init it unless in developer mode and things thus randomly fail\n without a trace.\n*/\nvar noOp = function(){}; // no-op function\nif (!window.console) {\n console = {\n debug: noOp,\n log: noOp,\n info: noOp,\n warn: noOp,\n error: noOp\n }\n}\n/*\n Make sure we can use Date.now which was not available in IE<9\n*/\nif (!Date.now) {\n Date.now = function now() {\n return new Date().getTime();\n };\n}\n\n/* call this function to set up console logging after log_level is set */\nvar init_log = function() {\n if (all_log_levels[log_level] >= all_log_levels["debug"]) {\n console.debug = function(msg) {\n console.log(Date.now()+" DEBUG: "+msg)\n };\n } else {\n console.debug = noOp;\n }\n if (all_log_levels[log_level] >= all_log_levels["info"]) {\n console.info = function(msg){\n console.log(Date.now()+" INFO: "+msg)\n };\n } else {\n console.info = noOp;\n }\n if (all_log_levels[log_level] >= all_log_levels["warn"]) {\n console.warn = function(msg){\n console.log(Date.now()+" WARN: "+msg)\n };\n } else {\n console.warn = noOp;\n }\n if (all_log_levels[log_level] >= all_log_levels["error"]) {\n console.error = function(msg){\n console.log(Date.now()+" ERROR: "+msg)\n };\n } else {\n console.error = noOp;\n }\n console.debug("log ready");\n}\n', 'ready': '\n var locale = extract_default_locale()\n console.log("loading dynamic snippet content");\n load_support("/public/support-snippet.html", true);\n load_about("/public/about-snippet.html");\n \n load_sitestatus("/public/status-events.json", [\'ANY\'], locale);\n ', 'site_extra': '<script type="text/javascript" src="https://siteimproveanalytics.com/js/siteanalyze_4573657.js"></script>'}, 'skipmenu': True, 'skipwidgets': True, 'skipuserstyle': True, 'skipuserprofile': False, 'backend': 'autocreate', 'base_menu': ['home', 'files', 'vgrids', 'archives', 'settings', 'setup', 'logout'], 'user_profile': {'full_name': None}}, {'object_type': 'header', 'text': 'Automatic ERDA-test2 sign up'}, {'object_type': 'error_text', 'text': 'input parsing error: openid.ns: http://specs.openid.net/auth/2.0: unexpected field: openid.ns'}, {'object_type': 'error_text', 'text': 'input parsing error: openid.ns.sreg: http://openid.net/extensions/sreg/1.1: unexpected field: openid.ns.sreg'}, {'object_type': 'error_text', 'text': 'input parsing error: openid.sreg.required: nickname,fullname,email,o,ou,country,state,role: unexpected field: openid.sreg.required'}, {'object_type': 'error_text', 'text': 'Input arguments were rejected - not allowed for this script!'}, {'object_type': 'link', 'text': 'Go back to try again', 'destination': 'javascript:history.back();'}]

jonasbardino added a commit that referenced this issue Apr 5, 2023
…dor dir to close dependabot vulnerability warning #1, #2, #3 and #4

git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@5684 b75ad72c-e7d7-11dd-a971-7dbc132099af
jonasbardino added a commit that referenced this issue Apr 5, 2023
…dor dir to close dependabot vulnerability warning #1, #2, #3 and #4

git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@5684 b75ad72c-e7d7-11dd-a971-7dbc132099af
@jonasbardino
Copy link
Contributor

Looking at your log it does not look like a valid sign up request. AFAICT you try to use the original external openid 2.0 signup through autocreate, but have no external openid 2.0 Identity Provider (IDP) associated.
You need to point the sign up (html form) to your Openid Connect IDP or use the https://SID_VHOST/cgi-sid/signup.py sign up helper unless you have a valid OpenID 2.0 IDP, that can deliver the requested SReg user attributes.

@jonasbardino jonasbardino added the invalid This doesn't seem right label Jul 6, 2023
@jonasbardino
Copy link
Contributor

Closing due to lack of activity or response. Please reopen or create a new ticket with the requested details if this is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants