Osticket API Valid API key required after adding all correct details - osticket

I have installed Osticket in my local server as well as dev server they are working fine
after i added same code and directories to live server its giving me Valid API key required Error
I changed all DB_names added privileges as i done in local and dev server. Also generated New API key as well.
One more thing UI part of Osticket is also working fine in live server that's means all settings working properly , then what is went wrong?
i'm attaching some screenshots for reference.

Related

Lighhouse server invalid token - LHCI invalid token

I have installed LHCI(Light House CI) server on an AWS EC2 instance(or my own home-server). The server is up and running. I have the url
I can add projects to the CI server with #lhci/cli#0.3 wizard and the project I create through client wizard appears successfully on the LHCI server.
As successful result of wizard it gives me two token. Admin and upload token whih I use it in my client config(upload token)
However, when it runs the auto-run and generates the report, the next step which is pushing data to my LHCI instance, it says token is invalid. I installed it on my own Linux box in my home network.
I thought it could be something wrong with my network and something dodgy happening. Then I installed it on EC2 and still same issue.
One thing I didn't find in the documentation is about whether the server needs to be HTTPS? (if you know this it could be a great help as well)
How come the upload token generated by the wizard is not valid ? what am I missing ?
I had the same problem. First, make sure the lhci client and server version match. It is thought that additional authentication factors have been added as the master version of lhci has recently been upgraded. In my case, the following error occurred and I solved it by setting the version to the same version.
Error: Unexpected status code 403
{"message":"Invalid token"}

Web API: Insufficient Privileges on Private Projects

Configuration Details
We have a SonarQube 6.7.2 (build 37468) on-premise installation running.
The instance is accessible from our office IP without HTTP Basic Auth, as well as from everywhere else with HTTP Basic Auth.
The "Force user authentication" option is off.
All projects are set to private - in case someone gets past the HTTP Basic Auth.
My user belongs to the sonar-administrators groups and has "Browse" and "See Source Code" permissions on all projects.
Using the web interface in the browser, I am able to see all projects including analysis results etc., as expected.
Problem
However, using the Web API, I receive "Insufficient Privileges" errors on several API calls.
My user has a valid token that I pass to cURL as described in the documentation. I even created a new token, to be sure I'm not using an invalid one.
Example
$ curl -X GET -u my_user_token: https://sonar.example.org/api/measures/search_history?component=the_project&metrics=lines_to_cover%2Cuncovered_lines%2Ccoverage&ps=1000
{"errors":[{"msg":"Insufficient privileges"}]}
Question
Is it not possible to retrieve measures information or project information via the API for projects that are set to private?
The above call works fine if the project is to public. (But then again, if the project is set to public, that call works fine even without authentication.)
We do have the same issue when using the SonarLint plugin for PHPStorm. The plugin works fine as long as the projects are public, but server sync stops working as soon as projects are set to private.
I'm thinking maybe it would be best to deny all requests to SonarQube except from our whitelisted office IP and have everyone connect via VPN if they want to access the instance from their home office. That would allow us to make all projects public and not have any of these issues. Is that the recommended way to run an on-premise installation of SonarQube?
Turns out the SonarQube instance was running behind an nginx reverse proxy that dropped the Authorization HTTP header from the request before passing it on to SonarQube.
After fixing the nginx configuration, all Web API calls work as expected.

API call within a Web API fails

I am working on a web api backend.
I am trying to make a call to another web api from within one of our api controllers.
When I run this as a unit test it works fine.
However, when it is hosted on IIS Express the GetAsync call fails with the exception: "No connection could be made because the target machine actively refused it 127.0.0.1:8888".
When we host it on azure we also get a similar exception.
Is there a setting in our web.config missing?
Any suggestions?
looks like it is still pointing to local host, needs to point to IIS or Azure server.
Check for hardcoded values in test code or web config.

Google API Testing on non 'localhost' named local server

I'm currently running MAMP Pro (osX 10.9.4) with several different virtual servers on my local machine, one for each of my client's projects. I've been trying to connect to the Google API use OAuth and have everything working just fine when 'REDIRECT URIS' is set to:
http://localhost:8888
However, as mentioned I've got several of these servers running,
e.g. 'https://clientname1:8890' or 'https://clientname2:8890'
Whenever I enter those into the API console I just get a 'Whoops' message telling me something has gone wrong Google's end:
"Server Error: Whoops! Our bad."
It seems as though only 'localhost' is allowed via the API for local testing, is there anyway I can set it up so I can test off any of my local servers?
I had to add my localhost to the allowed referrers list to test locally. Without that inclusion, I get 403 Forbidden errors. You probably just need to add clientname1 and clientname2 or clientname1:8890 and clientname2:8890 to the allowed referrers list in the Google Developers Console. Mine's set under public api access, so maybe it's going to be another problem for you depending what API you're using and how you're using it. Hope it helps -

Web API on IIS7.5 Unable to download * from localhost

I'm currently trying to install web api project directly from vs 2013 to my local dev machine, but when I test one of my http get controllers, I get the following:
My url looks like this:
http://localhost:8081/api/Location/States?queryTerm=Ark
When I test this on my local, this url works and I get my json response.
pay no attention to the web config error in the background. If I enter anything invalid, I get an IIS error, so I know I'm hitting the right URL.
Side note: I'm using IE8 for testing.
I found out the solution, and it may be a config thing, but when I made this as an virtual application to a website, this went away, and it gave me a yellow sign of death (which is a good thing). I was able to deduce this to be an oracle issue, where it couldn't find the database connection, and then found out it couldn't resolve tns names.
So I guess Web API can not be hosted by itself on IIS? I haven't looked into it, but it seems this to be the case, unless there needs to be more tweaking involved.
i know too late for response. But i get same error when I try deploy Odata v4 Application in IIS server.
In server , i hit this error as above, i try everything config but nothing change.
At last, i try connect from client and it work.
I recognize that in Client , it download a json file from Server (in case use Odata , it seem like wsdl file in webservice) and API still work well.
For some reason, it cant download in server, but dont worry, it still work.
Hope this helps!

Resources