Re: [Dev] [Architecture] APIM Statistics introduce new field to the Analytics events
Adding Fazlan. Shall we create a JIRA and prioritize this. On Mon, Dec 25, 2017 at 10:14 AM, Harsha Kumarawrote: > +1 to include this. It's a basic requirement to differentiate the prod and > sandbox traffic in the system. Also, correlation Id will help to track the > request and response if needed. > > On Sat, Dec 23, 2017 at 12:25 PM, Rukshan Premathunga > wrote: > >> Hi All, >> >> Can we check the possibility of the $Subject. In the latest >> APIM(wso2am-2.1.0-update4), correlation ID and the key type(sand or prod) >> is include in the event as JSON attribute[1]. I think it is better to moved >> those attributes as a single value attribute and passed to the Analyzer. >> So we can upgrade the stream versioning and do these changes. >> >> Also it is better to persist key type, data center ID in the STAT_DB and >> we can filter production and Sandbox analytics future. So when migrating we >> need to alter tables with key type. But we can assume that existing data >> are from the production key and insert those key type when migrating. >> >> So Any idea about this? >> >> >> [1] meta_clientType:{"keyType":"PRODUCTION","correlationID", >> "19c4350a-2079-406a-bece-808954b4f2d7"} >> Thanks and Regards >> >> -- >> Rukshan Chathuranga. >> Software Engineer. >> WSO2, Inc. >> +94711822074 <+94%2071%20182%202074> >> >> ___ >> Architecture mailing list >> architect...@wso2.org >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> >> > > > -- > Harsha Kumara > Software Engineer, WSO2 Inc. > Mobile: +94775505618 <+94%2077%20550%205618> > Blog:harshcreationz.blogspot.com > -- Harsha Kumara Software Engineer, WSO2 Inc. Mobile: +94775505618 Blog:harshcreationz.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [Architecture] APIM Statistics introduce new field to the Analytics events
+1 to include this. It's a basic requirement to differentiate the prod and sandbox traffic in the system. Also, correlation Id will help to track the request and response if needed. On Sat, Dec 23, 2017 at 12:25 PM, Rukshan Premathungawrote: > Hi All, > > Can we check the possibility of the $Subject. In the latest > APIM(wso2am-2.1.0-update4), correlation ID and the key type(sand or prod) > is include in the event as JSON attribute[1]. I think it is better to moved > those attributes as a single value attribute and passed to the Analyzer. > So we can upgrade the stream versioning and do these changes. > > Also it is better to persist key type, data center ID in the STAT_DB and > we can filter production and Sandbox analytics future. So when migrating we > need to alter tables with key type. But we can assume that existing data > are from the production key and insert those key type when migrating. > > So Any idea about this? > > > [1] meta_clientType:{"keyType":"PRODUCTION","correlationID", > "19c4350a-2079-406a-bece-808954b4f2d7"} > Thanks and Regards > > -- > Rukshan Chathuranga. > Software Engineer. > WSO2, Inc. > +94711822074 <+94%2071%20182%202074> > > ___ > Architecture mailing list > architect...@wso2.org > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- Harsha Kumara Software Engineer, WSO2 Inc. Mobile: +94775505618 Blog:harshcreationz.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [IS] Generate token with auth code grant - Using same code twice
Many thanks Omindu..!!! On Sun, Dec 24, 2017 at 2:23 PM, Omindu Rathnaweerawrote: > Hi Mahesh, > > This issue was fixed with a WUM update. > > Regards, > Omindu. > > On Sun, Dec 24, 2017 at 5:47 PM, Mahesh Chinthaka > wrote: > >> Hi Maduranga/ Danushka, >> >> I got the same NPE error while doing the same. After setting >> EnableOAuthCache to true in identity.xml, error disappeared. >> According to IDENTITY-5830 seems like it got fixed in 5.4.0-M1, here Im >> using 5.3.0 >> >> Do we have a backported fix for this ? Or is it ok if I keep that change >> as it is (EnableOAuthCache=true) >> Note this is for a production setup. >> >> Please advise. >> >> On Thu, Mar 23, 2017 at 5:06 AM, Danushka Fernando >> wrote: >> >>> Createed https://wso2.org/jira/browse/IDENTITY-5830 to track this >>> >>> Thanks & Regards >>> Danushka Fernando >>> Senior Software Engineer >>> WSO2 inc. http://wso2.com/ >>> Mobile : +94716332729 <+94%2071%20633%202729> >>> >>> On Thu, Mar 23, 2017 at 9:22 AM, Maduranga Siriwardena < >>> madura...@wso2.com> wrote: >>> Sorry the code line should be [1]. Previous line I pointed [2] has the same issue. [1] https://github.com/wso2-extensions/identity-inbound-auth -oauth/blob/v5.3.4/components/org.wso2.carbon.identity.oauth /src/main/java/org/wso2/carbon/identity/oauth2/token/handler s/grant/AuthorizationCodeGrantHandler.java#L121 [2] https://github.com/wso2-extensions/identity-inbound-auth -oauth/blob/v5.3.4/components/org.wso2.carbon.identity.oauth /src/main/java/org/wso2/carbon/identity/oauth2/token/handler s/grant/AuthorizationCodeGrantHandler.java#L184 Thanks, On Wed, Mar 22, 2017 at 10:49 PM, Maduranga Siriwardena < madura...@wso2.com> wrote: > Hi Danushka, > > The problem seems to be oauthCache is only initialized when > EnableOAuthCache is set to true in identity.xml. Default value is false. > So > oauthCache is null and when we try to clear the cache entry [1] it gives > NPE. > > [1] https://github.com/wso2-extensions/identity-inbound-auth > -oauth/blob/v5.3.4/components/org.wso2.carbon.identity.oauth > /src/main/java/org/wso2/carbon/identity/oauth2/token/handler > s/grant/AuthorizationCodeGrantHandler.java#L184 > > Thanks, > > On Wed, Mar 22, 2017 at 10:41 PM, Danushka Fernando < > danush...@wso2.com> wrote: > >> Hi All >> I generated an auth code and used that code to issue an access token. >> In second time as expected its not giving me an access token if I use >> same >> code. But there is a null pointer. >> >> TID: [-1234] [] [2017-03-23 08:46:21,034] INFO >> {org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration} - >> The default Identity OAuth token issuer will be used. No custom token >> generator is set. >> TID: [-1234] [] [2017-03-23 08:47:12,696] WARN >> {org.wso2.carbon.identity.oauth.endpoint.authz.OAuth2AuthzEndpoint} >> - No session state found for the received Session ID : >> afbb08c6-d832-4154-9e68-116cc02b7b94 >> TID: [-1234] [] [2017-03-23 08:50:59,399] ERROR >> {org.wso2.carbon.identity.oauth2.OAuth2Service} - Error occurred >> while issuing the access token for Client ID : >> jF2udC5fHAZwglHYuYVt9rXdgrIa, User ID null, Scope : [] and Grant Type : >> authorization_code >> java.lang.NullPointerException >> at org.wso2.carbon.identity.oauth2.token.handlers.grant.Authori >> zationCodeGrantHandler.validateGrant(AuthorizationCodeGrantH >> andler.java:121) >> at org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.issu >> e(AccessTokenIssuer.java:212) >> at org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessTok >> en(OAuth2Service.java:223) >> at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEnd >> point.getAccessToken(OAuth2TokenEndpoint.java:287) >> at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEnd >> point.issueAccessToken(OAuth2TokenEndpoint.java:151) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce >> ssorImpl.java:62) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe >> thodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:498) >> at org.apache.cxf.service.invoker.AbstractInvoker.performInvoca >> tion(AbstractInvoker.java:188) >> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(Abstra >> ctInvoker.java:104) >> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:204) >> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:101) >> at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(S >> erviceInvokerInterceptor.java:58) >> at
Re: [Dev] [IS] Generate token with auth code grant - Using same code twice
Hi Mahesh, This issue was fixed with a WUM update. Regards, Omindu. On Sun, Dec 24, 2017 at 5:47 PM, Mahesh Chinthakawrote: > Hi Maduranga/ Danushka, > > I got the same NPE error while doing the same. After setting > EnableOAuthCache to true in identity.xml, error disappeared. > According to IDENTITY-5830 seems like it got fixed in 5.4.0-M1, here Im > using 5.3.0 > > Do we have a backported fix for this ? Or is it ok if I keep that change > as it is (EnableOAuthCache=true) > Note this is for a production setup. > > Please advise. > > On Thu, Mar 23, 2017 at 5:06 AM, Danushka Fernando > wrote: > >> Createed https://wso2.org/jira/browse/IDENTITY-5830 to track this >> >> Thanks & Regards >> Danushka Fernando >> Senior Software Engineer >> WSO2 inc. http://wso2.com/ >> Mobile : +94716332729 <+94%2071%20633%202729> >> >> On Thu, Mar 23, 2017 at 9:22 AM, Maduranga Siriwardena < >> madura...@wso2.com> wrote: >> >>> Sorry the code line should be [1]. Previous line I pointed [2] has the >>> same issue. >>> >>> [1] https://github.com/wso2-extensions/identity-inbound-auth >>> -oauth/blob/v5.3.4/components/org.wso2.carbon.identity.oauth >>> /src/main/java/org/wso2/carbon/identity/oauth2/token/handler >>> s/grant/AuthorizationCodeGrantHandler.java#L121 >>> [2] https://github.com/wso2-extensions/identity-inbound-auth >>> -oauth/blob/v5.3.4/components/org.wso2.carbon.identity.oauth >>> /src/main/java/org/wso2/carbon/identity/oauth2/token/handler >>> s/grant/AuthorizationCodeGrantHandler.java#L184 >>> >>> Thanks, >>> >>> On Wed, Mar 22, 2017 at 10:49 PM, Maduranga Siriwardena < >>> madura...@wso2.com> wrote: >>> Hi Danushka, The problem seems to be oauthCache is only initialized when EnableOAuthCache is set to true in identity.xml. Default value is false. So oauthCache is null and when we try to clear the cache entry [1] it gives NPE. [1] https://github.com/wso2-extensions/identity-inbound-auth -oauth/blob/v5.3.4/components/org.wso2.carbon.identity.oauth /src/main/java/org/wso2/carbon/identity/oauth2/token/handler s/grant/AuthorizationCodeGrantHandler.java#L184 Thanks, On Wed, Mar 22, 2017 at 10:41 PM, Danushka Fernando wrote: > Hi All > I generated an auth code and used that code to issue an access token. > In second time as expected its not giving me an access token if I use same > code. But there is a null pointer. > > TID: [-1234] [] [2017-03-23 08:46:21,034] INFO > {org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration} - > The default Identity OAuth token issuer will be used. No custom token > generator is set. > TID: [-1234] [] [2017-03-23 08:47:12,696] WARN > {org.wso2.carbon.identity.oauth.endpoint.authz.OAuth2AuthzEndpoint} - > No session state found for the received Session ID : > afbb08c6-d832-4154-9e68-116cc02b7b94 > TID: [-1234] [] [2017-03-23 08:50:59,399] ERROR > {org.wso2.carbon.identity.oauth2.OAuth2Service} - Error occurred > while issuing the access token for Client ID : > jF2udC5fHAZwglHYuYVt9rXdgrIa, User ID null, Scope : [] and Grant Type : > authorization_code > java.lang.NullPointerException > at org.wso2.carbon.identity.oauth2.token.handlers.grant.Authori > zationCodeGrantHandler.validateGrant(AuthorizationCodeGrantH > andler.java:121) > at org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.issu > e(AccessTokenIssuer.java:212) > at org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessTok > en(OAuth2Service.java:223) > at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEnd > point.getAccessToken(OAuth2TokenEndpoint.java:287) > at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEnd > point.issueAccessToken(OAuth2TokenEndpoint.java:151) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce > ssorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe > thodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.apache.cxf.service.invoker.AbstractInvoker.performInvoca > tion(AbstractInvoker.java:188) > at org.apache.cxf.service.invoker.AbstractInvoker.invoke(Abstra > ctInvoker.java:104) > at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:204) > at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:101) > at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(S > erviceInvokerInterceptor.java:58) > at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleM > essage(ServiceInvokerInterceptor.java:94) > at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Phase > InterceptorChain.java:272) > at org.apache.cxf.transport.ChainInitiationObserver.onMessage(C
Re: [Dev] [IS] Generate token with auth code grant - Using same code twice
Hi Maduranga/ Danushka, I got the same NPE error while doing the same. After setting EnableOAuthCache to true in identity.xml, error disappeared. According to IDENTITY-5830 seems like it got fixed in 5.4.0-M1, here Im using 5.3.0 Do we have a backported fix for this ? Or is it ok if I keep that change as it is (EnableOAuthCache=true) Note this is for a production setup. Please advise. On Thu, Mar 23, 2017 at 5:06 AM, Danushka Fernandowrote: > Createed https://wso2.org/jira/browse/IDENTITY-5830 to track this > > Thanks & Regards > Danushka Fernando > Senior Software Engineer > WSO2 inc. http://wso2.com/ > Mobile : +94716332729 <+94%2071%20633%202729> > > On Thu, Mar 23, 2017 at 9:22 AM, Maduranga Siriwardena > wrote: > >> Sorry the code line should be [1]. Previous line I pointed [2] has the >> same issue. >> >> [1] https://github.com/wso2-extensions/identity-inbound-auth >> -oauth/blob/v5.3.4/components/org.wso2.carbon.identity. >> oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/ >> handlers/grant/AuthorizationCodeGrantHandler.java#L121 >> [2] https://github.com/wso2-extensions/identity-inbound-auth >> -oauth/blob/v5.3.4/components/org.wso2.carbon.identity. >> oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/ >> handlers/grant/AuthorizationCodeGrantHandler.java#L184 >> >> Thanks, >> >> On Wed, Mar 22, 2017 at 10:49 PM, Maduranga Siriwardena < >> madura...@wso2.com> wrote: >> >>> Hi Danushka, >>> >>> The problem seems to be oauthCache is only initialized when >>> EnableOAuthCache is set to true in identity.xml. Default value is false. So >>> oauthCache is null and when we try to clear the cache entry [1] it gives >>> NPE. >>> >>> [1] https://github.com/wso2-extensions/identity-inbound-auth >>> -oauth/blob/v5.3.4/components/org.wso2.carbon.identity.oauth >>> /src/main/java/org/wso2/carbon/identity/oauth2/token/handler >>> s/grant/AuthorizationCodeGrantHandler.java#L184 >>> >>> Thanks, >>> >>> On Wed, Mar 22, 2017 at 10:41 PM, Danushka Fernando >>> wrote: >>> Hi All I generated an auth code and used that code to issue an access token. In second time as expected its not giving me an access token if I use same code. But there is a null pointer. TID: [-1234] [] [2017-03-23 08:46:21,034] INFO {org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration} - The default Identity OAuth token issuer will be used. No custom token generator is set. TID: [-1234] [] [2017-03-23 08:47:12,696] WARN {org.wso2.carbon.identity.oauth.endpoint.authz.OAuth2AuthzEndpoint} - No session state found for the received Session ID : afbb08c6-d832-4154-9e68-116cc02b7b94 TID: [-1234] [] [2017-03-23 08:50:59,399] ERROR {org.wso2.carbon.identity.oauth2.OAuth2Service} - Error occurred while issuing the access token for Client ID : jF2udC5fHAZwglHYuYVt9rXdgrIa, User ID null, Scope : [] and Grant Type : authorization_code java.lang.NullPointerException at org.wso2.carbon.identity.oauth2.token.handlers.grant.Authori zationCodeGrantHandler.validateGrant(AuthorizationCodeGrantH andler.java:121) at org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.issu e(AccessTokenIssuer.java:212) at org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessTok en(OAuth2Service.java:223) at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEnd point.getAccessToken(OAuth2TokenEndpoint.java:287) at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEnd point.issueAccessToken(OAuth2TokenEndpoint.java:151) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.cxf.service.invoker.AbstractInvoker.performInvoca tion(AbstractInvoker.java:188) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(Abstra ctInvoker.java:104) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:204) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:101) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(S erviceInvokerInterceptor.java:58) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleM essage(ServiceInvokerInterceptor.java:94) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Phase InterceptorChain.java:272) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(C hainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke (AbstractHTTPDestination.java:249) at org.apache.cxf.transport.servlet.ServletController.invokeDes tination(ServletController.java:248) at