Calling external rest resources within confluence atlassian wiki - rest

I want to call external rest resource from within confluence atlassian wiki .
Any examples ?
Can this be achieved via CLI in the backend ?
Please kindly share your thoughts.

The fact that you need this is a warning sign about the design of your app. The plugin api is way more powerful than the REST api and you should lern to use it.
Technically, what you want is possible, but you may have a problem with authentication. When you try to reach the web interface from the backend, you have to log in as a user, you will not be automatically logged in as the backend user. You also need to have access to the url, which is not automatic in corporte environment with all kinds of complex networks solutions.

If the rest service is unauthenticated then you could look to Enable the html-include macro.
Which would allow you to do an html include of the GET REST service call within the page.
Would look like this once enabled:
{html-include:url=http://www.example.com/rest/myservice?param1=1}
However, I suggest looking to use their whitelist feature if you do this.
This also only works for self hosted instances and not for on-demand.

Related

How Acumatica Cloud ERP integration works for third party application?

We have an application developed with react and NodeJs and already implemented an MYOB cloud ERP integration to import data. Now we are planning to add a new ERP integration for Acumatica, in the developer document it was mentioned that the rest API is available but I can't find the cloud instance URL, everywhere it was mentioned as localhost only. So can anyone please help me to understand how to connect the Acumatica cloud to fetch details?
Note: I understand the authorization flow like Authorization Code but I'm confused with which URL to use for and I hope it should be a fixed one as it is a cloud URL
The Integration end points is a rather large topic. I am in the process of writing a blog post on it which is more or less a getting started blog on automating stuff and getting info via ReST. The blog itself is in the context of using these services via PowerShell but if you are able to follow along and get to the point of establishing postman examples of what you need to do you should be able to get to the same end result in any language.
You will want to explore The Web Services Endpoint screen in the integration module as this is where all the Contract Based Soap/ReST definitions are managed. You can even set up custom endpoint if you need.
Do you have access to the Acumatica Portal? The best way to get started is with some of the course work there.
Stand by and ill forward some information for you to get started.
Robert
The URL for the RestAPI is whatever is the site URL of your Acumatica instance. For example if your Acumatica is hosted in www.ManiMaran.com. To login to your API :
http://ManiMaran.com/entity/auth/login.

Setting SSO for Grafana

I have a web application which has a login page and it returns me lot of reports. To dashboard those data I am using Grafana.
I want to integrate a SSO between my app and grafana. When user logs in to my web application, he should be logged into grafana too. To do this I went through the grafana documentation. I didn't understand much. I tried with google.auth but is not right way for my requirement.
It should be possible to login using the credentials which are used to login to my web application. Any work around for this??
It's not very easy to achieve this but it's possible. As far as I know, Grafana is not yet supposed to work as SSO client out of the box. There is a workaround approach to expose it via proxy and to make Grafana trust whatever comes in from the proxy side: Authproxy Docs
On the other hand, you need to understand how SSO works. You'll need a server that will act as Identity Provider and your web apps will act as Service Providers (SSO Clients). You need to choose desired protocol, so far SAML2 and OIDC are very popular but there are others as well. I can recommend WSO2 Identity Server as it's free and open source, but maybe way too robust for your use case as well.
Considering the way how Authproxy concept in Grafana works, I would say the easiest would be to make workaround around workaround and to share session from your app to Grafana. From the architectural perspective it's not wise but considering the way you've asked this question, I would say you're missing a lot of knowledge about SSO in general.
You have to integrate your application and Grafana with a centralized OIDC IdP server using OIDC authorization code flow.

How to implement Authentication as a Web Service (Symfony2, REST)

I hope someone could help with this:
I am working on a php project and I need to implement the authentication of the application as a Service. I need to do something like Google where offers a Service to login in other applications using Google's Authentication Service (for example trello.com allows visitors to login with their google account).
I would like to clarify my mind, because I have no idea how to start it. I am using Symfony2 framework and I'm trying to work RESTFully, but basically what I need is just an idea of what I have to do or investigate to carry this out.
As the symfony Ecosystem is big, take a look at the FOSRestBundle for creating the API. Then there is the NelmioApiDocBundle for easy documentation of your REST-API. For authenticating you should consider OAuth, so take a look at the FOSOAuthServerBundle. With all three combined you can create a great API.
Also read this article, about REST APIs with Symfony2: The Right Way

How to use RESTful Geoserver?

I'd like to use REST protocol with Geoserver running on a web, but when I enter username and password used to log into web interface, I get HTTP ERROR: 401 Full authentication is required to access this resource. Do I need to create separate user with some privileges? May it be webhosting related issue?
Update: I'm able to access existing workspace with web browser, but using QGIS to create new workspace I end up with error mentioned above.
Thank you.
Well I know this is a little late but I will answer it so that hopefully other people with this issue may find it helpful.
The REST process has its own security configuration that needs to be setup in addition to the web interface user. These are different configurations and are setup in different spots. The REST configuration does use that same users you have configured in the web interface it just doesn't use the access rules that you would have set up.
To setup the permissions you need to edit a file in the directory [Geoserver_data}/security called rest.properties.
Please see here and here on what entires to add and edit in this file to provide access to the rest services.

Creating a restful service with external provider for authentication

I would like to have some guidance regarding how to handle authentication for my restful service to be able to support a couple of different scenarios, see included image?
I've been thinking about this problem for a couple of week without finding a solution for all of the cases and even if I'll make trade offs I'll be running into problems
If we skip the Mobile application and the use of Curl, there's no need to expose the service to the public and it would be possible to use basic authentication for the server to server communication. But we'll still need to put some responsibility at the "Web site for ninjas only" to pass the (openid authenticated user) as part for the http header?
In this case we're using Google apps to manage credentials for our co-workers and I don't like the idea to manage another username/password within the service if it's possible to avoid.
Is there any sustainable solution for my dreams, so that I can build awesome features for the client and implement a tight api that manages the authorization for different resources for a specific user?
Another possible to solution might be to integrate the service with the openid provider, but then I'll have problem with passing the user from "Web site for ninjas only"