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

Issues with "Client's registration expires" control of OIDC client's properties page #1284

Closed
aliaksander-samuseu opened this Issue Oct 2, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@aliaksander-samuseu

aliaksander-samuseu commented Oct 2, 2018

Environment:

CentOS 7.4, gluu-server-3.1.4

Steps to reproduce:

  1. Log in to web UI
  2. Open an OIDC client for editing
  3. Find "Clean" button in "Client's registration expires" control and click it to clear the time
  4. Click the "Update" button to save the change

Result:
User is sent to /identity/error page with a general error message. Changes are not applied to the client's entry. A Java error trace is registered in oxtrust.log:

2018-10-01 20:57:22,408 DEBUG [qtp1094834071-17] [org.gluu.oxtrust.exception.GlobalExceptionHandler] (GlobalExceptionHandler.java:61) - #{updateClientAction.save}: java.lang.NullPointerException
javax.faces.FacesException: #{updateClientAction.save}: java.lang.NullPointerException
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:89) ~[javax.faces-2.2.16.jar:2.2.16]
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [javax.faces-2.2.16.jar:2.2.16]
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) [javax.faces-2.2.16.jar:2.2.16]
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658) [javax.faces-2.2.16.jar:2.2.16]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:857) [jetty-servlet-9.4.12.v20180830.jar:9.4.12.v20180830]
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655) [jetty-servlet-9.4.12.v20180830.jar:9.4.12.v20180830]
	at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:226) [rewrite-servlet-3.4.2.Final.jar:3.4.2.Final]
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) [jetty-servlet-9.4.12.v20180830.jar:9.4.12.v20180830]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) [jetty-servlet-9.4.12.v20180830.jar:9.4.12.v20180830]

Another issue with this control is that when non-expiring clients' entries exist in the system (for example, when migrated from older packages during upgrade process), this control doesn't appear for them at all, so user can't set expiration for them if they would like to.

Expected result:

  1. The control should allow complete clearance of expiration date, turning the client entry into non-expiring (permanent) - as it was possible in the previous packages. This is usually the result you expect when creating it manually (expiration makes more sense for auto-enrolled clients)
  2. Even if a client's entry is of a permanent type, the control still must be displayed in its properties, allowing user to turn it into expiring entry at any time.
@syntrydy

This comment has been minimized.

Contributor

syntrydy commented Oct 12, 2018

@aliaksander-samuseu I fixed it as requested.

Existing clients now also display the calendar hence user can change their expiration date.
When new client is create without expiration date we set it to current date+one century. Note that the field is of type date so only date value as accepted.

syntrydy pushed a commit that referenced this issue Oct 12, 2018

syntrydy added a commit that referenced this issue Oct 12, 2018

Merge pull request #1302 from /issues/1284
Fix OIDC clients properties page #1284

syntrydy pushed a commit that referenced this issue Oct 12, 2018

@syntrydy syntrydy closed this Oct 12, 2018

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