cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FEDIZ-194) NPE when restarting Fediz OIDC after using dynamic registration
Date Thu, 09 Mar 2017 13:14:38 GMT

    [ https://issues.apache.org/jira/browse/FEDIZ-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15903021#comment-15903021
] 

ASF GitHub Bot commented on FEDIZ-194:
--------------------------------------

GitHub user gonzalad opened a pull request:

    https://github.com/apache/cxf-fediz/pull/13

    FEDIZ-194: NPE fix when using dynamicReg

    Fix NPE on fediz OIDC module startup after
    using dynamic Client Registration.
    
    When using dynamic Client Registration, client.resourceOwnerSubject
    is null.
    We now check this field and display only manually
    registered Clients in Fediz UI.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gonzalad/cxf-fediz FEDIZ-194

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf-fediz/pull/13.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #13
    
----
commit 6e951fe0a81020a17061b3165ec73bce971b05b5
Author: gonzalad <adr_gonzalez@yahoo.fr>
Date:   2017-03-09T11:30:56Z

    FEDIZ-194: NPE fix when using dynamicReg
    
    Fix NPE on fediz OIDC module startup after
    using dynamic Client Registration.
    
    When using dynamic Client Registration, client.resourceOwnerSubject
    is null.
    We now check this field and display only manually
    registered Clients in Fediz UI.

----


> NPE when restarting Fediz OIDC after using dynamic registration
> ---------------------------------------------------------------
>
>                 Key: FEDIZ-194
>                 URL: https://issues.apache.org/jira/browse/FEDIZ-194
>             Project: CXF-Fediz
>          Issue Type: Bug
>            Reporter: gonzalad
>            Priority: Trivial
>
> I'm using dynamic registration and I have a NPE on oidc module restart.
> The scenario is this one :
>  1. I register dynamically a oidc client
>      POST to http://localhost:9080/oidc/services/register
>  2. I then restart the oidc module (I could restart all tomcat, it should be the same).
>      I have the following error on restart :
> {code}
> idp_1  | Caused by: java.lang.NullPointerException
> idp_1  | 	at org.apache.cxf.fediz.service.oidc.clients.ClientRegistrationService.init(ClientRegistrationService.java:418)
> idp_1  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> idp_1  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> idp_1  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> idp_1  | 	at java.lang.reflect.Method.invoke(Method.java:498)
> idp_1  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1719)
> idp_1  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1656)
> idp_1  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1585)
> idp_1  | 	... 59 more
> {code}
> This is because when we create a Client dynamically, client.getResourceOwnerSubject()
 is null.
> We than have a NPE in c.getResourceOwnerSubject().getLogin();
> See https://github.com/apache/cxf-fediz/blob/master/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java#L425




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message