[jira] [Commented] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Mitesh (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389765#comment-16389765
 ] 

Mitesh commented on UNOMI-170:
--

Thanks Serge, I will try with the branch which you are using.




> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating, 1.3.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Major
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Serge Huber (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389763#comment-16389763
 ] 

Serge Huber commented on UNOMI-170:
---

Yes I reproduced the problem with both 1.2.0 and the master. Only the branch I 
was currently working on, that's called feature-UNOMI-5-KARAF4-1 doesn't have 
this problem. 

I think this might be an issue with the underlying Apache CXF framework that is 
used to expose the REST API endpoints, which will be corrected by the updated 
CXF versions in the new branch that hopefully will be merged soon.

 

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating, 1.3.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Major
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Mitesh (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389758#comment-16389758
 ] 

Mitesh commented on UNOMI-170:
--

Hi,

Thanks, I am testing it with 1.2.0, please try with it.

Mitesh




> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating, 1.3.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Major
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Serge Huber (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389746#comment-16389746
 ] 

Serge Huber edited comment on UNOMI-170 at 3/7/18 4:11 PM:
---

Ok I can confirm that this problem is fixed in the Karaf 4 branch where we have 
updated the CXF version. This is planned to be merged as soon as we finish 
fixing the remaining issues. 

A way around this would be to use a server proxy because the /cxs endpoint is 
not designed to be accessible from the outside world while the /context.json 
and /eventcollector endpoints are.

 


was (Author: shuber):
Ok I can confirm that this problem is fixed in the Karaf 4 branch where we have 
updated the CXF version. This is planned to be merged as soon as we finish 
fixing the remaining issues. 

 

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating, 1.3.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Blocker
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Serge Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber updated UNOMI-170:
--
Affects Version/s: 1.3.0-incubating

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating, 1.3.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Blocker
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Serge Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber updated UNOMI-170:
--
Priority: Major  (was: Blocker)

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating, 1.3.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Major
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Serge Huber (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389746#comment-16389746
 ] 

Serge Huber commented on UNOMI-170:
---

Ok I can confirm that this problem is fixed in the Karaf 4 branch where we have 
updated the CXF version. This is planned to be merged as soon as we finish 
fixing the remaining issues. 

 

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Blocker
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Serge Huber (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389705#comment-16389705
 ] 

Serge Huber edited comment on UNOMI-170 at 3/7/18 4:01 PM:
---

Hello Mitesh, 

No I haven't added any configuration, but I should mention that I was testing 
with the current branch I am working on for Karaf 4, not with the 1.2.0 or the 
master. I'll try to test that to see if there is a difference.

Best regards,

  Serge... 


was (Author: shuber):
Hello Mitesh, 

No I haven't added any configuration, but I should mention that I was testing 
with the master branch of Apache Unomi, not with the 1.2.0. I'll try to test 
that to see if there is a difference.

Best regards,

  Serge... 

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Blocker
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Serge Huber (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389705#comment-16389705
 ] 

Serge Huber commented on UNOMI-170:
---

Hello Mitesh, 

No I haven't added any configuration, but I should mention that I was testing 
with the master branch of Apache Unomi, not with the 1.2.0. I'll try to test 
that to see if there is a difference.

Best regards,

  Serge... 

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Blocker
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Mitesh (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389700#comment-16389700
 ] 

Mitesh commented on UNOMI-170:
--

Hi,

Yes I had accepted the certificate.
Most of the time we have to add headers for CROS in apache.

Let me know if you had added any configuration changes for unomi server for
CROS.

Thanks





> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Blocker
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Serge Huber (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389693#comment-16389693
 ] 

Serge Huber edited comment on UNOMI-170 at 3/7/18 3:36 PM:
---

Hello,

I have downloaded, compiled and installed your example. It seems to work in my 
case but I had previously accepted the self-signed certificates in my browser. 
I have tested on Safari, Chrome and Firefox and got the same results.

If you access [https://localhost:9443/cxs/rule]s directly in your browser does 
it ask you to accept the certificate ? 

Regards,

  Serge... 


was (Author: shuber):
Hello,

I have downloaded, compiled and installed your example. It seems to work in my 
case but I had previously accepted the self-signed certificates in my browser.

If you access [https://localhost:9443/cxs/rule]s directly in your browser does 
it ask you to accept the certificate ? 

Regards,

  Serge... 

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Blocker
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Mitesh Jain (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389434#comment-16389434
 ] 

Mitesh Jain edited comment on UNOMI-170 at 3/7/18 12:26 PM:


Hi Serge,

Thanks for your response, it is helping me a lot,

Sample code is uploaded here: [https://github.com/mitijain123/unomi-rules]

This is a angular 4 application you can run it with command: npm start

 

I had passed the credentials as 
 headers.append('Authorization', "Basic " + btoa("karaf:karaf"));

If you can tell me, what is the right way to authenticating and then passing 
the credentials over to the rules API, it will be really helpful.

 

Thanks


was (Author: mitijain...@gmail.com):
Hi Serge,

Thanks for your response, it is helping me a lot,

Sample code is uploaded here: https://github.com/mitijain123/unomi-rules

This is a angular 4 application you can run it with command: npm start

 

I had passed the credentials as 
 headers.append('Authorization', "Basic " + btoa("karaf:karaf"));

If you can telling what is the right way to authenticating and then passing the 
credentials over to the rules API, it will be really helpful.

 

Thanks

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Blocker
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Mitesh Jain (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389434#comment-16389434
 ] 

Mitesh Jain edited comment on UNOMI-170 at 3/7/18 11:59 AM:


Hi Serge,

Thanks for your response, it is helping me a lot,

Sample code is uploaded here: https://github.com/mitijain123/unomi-rules

This is a angular 4 application you can run it with command: npm start

 

I had passed the credentials as 
 headers.append('Authorization', "Basic " + btoa("karaf:karaf"));

If you can telling what is the right way to authenticating and then passing the 
credentials over to the rules API, it will be really helpful.

 

Thanks


was (Author: mitijain...@gmail.com):
Hi Serge,

Thanks for your response, it is helping me a lot,

I had passed the credentials as 
headersa.append('Authorization', "Basic " + btoa("karaf:karaf"));

If you can telling what is the right way to authenticating and then passing the 
credentials over to the rules API, it will be really helpful.

 

Thanks

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Blocker
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Mitesh Jain (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389434#comment-16389434
 ] 

Mitesh Jain commented on UNOMI-170:
---

Hi Serge,

Thanks for your response, it is helping me a lot,

I had passed the credentials as 
headersa.append('Authorization', "Basic " + btoa("karaf:karaf"));

If you can telling what is the right way to authenticating and then passing the 
credentials over to the rules API, it will be really helpful.

 

Thanks

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Blocker
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UNOMI-170) UNOMI CORS Issue is coming when trying to fetch RULES

2018-03-07 Thread Serge Huber (JIRA)

[ 
https://issues.apache.org/jira/browse/UNOMI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389229#comment-16389229
 ] 

Serge Huber commented on UNOMI-170:
---

Hello Mitesh,

Thanks for your interest in Unomi.

All the CXS APIs are protected by authentication and should have the pre-flight 
setup for all requests (see 
[https://github.com/apache/incubator-unomi/blob/unomi-root-1.2.0-incubating/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java]
 in the annotations), so in your AJAX request did you make sure you are 
authenticating and then passing the credentials over to the rules API request ? 
I see that you had an authentication error before the OPTIONS request.

Here's a resource that might be helpful.

[https://gist.github.com/mlynch/be92735ce4c547bd45f6]

Otherwise could you provide a test sample that reproduces the problem ? I tried 
reproducing it with this tool ([https://www.test-cors.org/)] but only after 
having properly authenticated and accepted the certificate (Unomi is provided 
with a self-signed certificate that might be refused by default on some 
browsers such as Chrome). Also which browser are you using in your tests ?

Best regards,

  Serge... 

> UNOMI CORS Issue is coming when trying to fetch RULES
> -
>
> Key: UNOMI-170
> URL: https://issues.apache.org/jira/browse/UNOMI-170
> Project: Apache Unomi
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.2.0-incubating
> Environment: Mac OS
>Reporter: Mitesh Jain
>Priority: Blocker
>  Labels: security
> Attachments: Screen Shot 2018-03-07 at 11.35.27 AM.png
>
>
> Hi,
> My Name is Mitesh Jain,
> I am new to Unomi.
> All installations are done according to this link:
> [http://unomi.incubator.apache.org/]
> When I am trying to access the rest api cxs to fetch all the rules, it is 
> showing properly in browser when I browse,
> [https://localhost:9443/cxs/rules]
> but when I am trying to access the same using my Angular application to fetch 
> rules using above url, 
> [https://localhost:9443/cxs/rules|https://localhost:9443/cxs/rules/] it will 
> make a OPTIONS call and I am getting the error as "No 
> 'Access-Control-Allow-Origin' header is present on the requested resource."
> Please Let me know how to fix this CORS issue.
> Mitesh Jain
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)