Comments (14)
Hi @ravics09 Can you share a little more setup information? What is the working configuration, is the working case on the same machine? Is postman being used in the working case? There shouldn't be a mapping, have you tried with setting the explicit port in the command?
from conjur-quickstart.
Hi @rpothier ,
Setup Information:
Docker version - 2.5.0
OS - Windows 10
Yes I am trying postman on same machine to test conjur REST APIs. How I can set explicit port with the command.
Docker Setting
On conjur CLI I able to access those api. like
But when I try to access http://conjur using curl command on git bash I am not getting correct output.
from conjur-quickstart.
I too trying same kind of scenario...trying to get secret from postman using restapi. Any solution found???
from conjur-quickstart.
Hi @ravics09 In the git bash case shouldn't that be run inside the container?
i.e. docker-compose exec client curl ...
from conjur-quickstart.
Hi @rpothier ,
Yes In git bash using docker-compose..... I am getting Authorization missing
But After adding token manually it worked.
In case of postman, I am still facing issue. How we can access conjur rest apis in postman?
I searched regarding it but didn't find anything on internet.
from conjur-quickstart.
guys is there any way to can access conjur rest apis in postman???
from conjur-quickstart.
OK, thanks @ravics09 . So now it's ok with gitbash, and only an issue with Postman, is this correct?
from conjur-quickstart.
Also, @ravics09 and @venkatesh22pv for questions on the API to use in postman, you can refer to https://github.com/cyberark/conjur-openapi-spec/wiki
from conjur-quickstart.
Thanks @rpothier
I have given sometime on it and got success to access conjur api on postman.
Still one issue there for each api request I have to add access token manually in the request header.
Below request not generating token automatically
curl -H "$(conjur authn authenticate -H)" http://localhost:8080/whoami
So I tried below code and added token manually and it worked.
curl --request GET \
--url http://localhost:8080/whoami \
--header 'authorization: Token token="XXXXXXXXX"
"$(conjur authn authenticate -H)"
is not working with postman to generate token.
Can you help me in it ? @rpothier @izgeri
from conjur-quickstart.
Hi @ravics09 How are you generating the token? Are you generating from the gitbash shell or the docker container.
you can generate the token by calling the docker container like this.
curl -H "$(docker-compose exec client conjur authn authenticate -H)" -k https://localhost:8443/whoami
from conjur-quickstart.
@ravics09 I've done a little digging into your issue.
Git-Bash
I think the problem you're experiencing is that the "$(conjur authn authenticate -H)"
command substitution is occurring in your shell, and not in the client
service, where the conjur
executable resides.
This can be fixed by executing the command as a string, and escaping the contained "
and $
. This version of the command will substitute the authentication command from the shell of the client
service, where it will execute successfully.
docker-compose exec client sh -c "curl -H \"\$(conjur authn authenticate -H)\" http://conjur/whoami"
Postman
I would like to understand the problem you're having with Postman further, as I'm currently working on a guide for exploring the Conjur API using Postman and the Conjur OpenAPI Spec. I have a preliminary version here if you want to take a look, any feedback is appreciated.
I think the problem is similar to the Git-Bash problem, where you are evoking conjur
outside of the conjur-cli
. In what context are you using the command $(conjur authn authenticate -H)
in Postman? As a pre-request hook?
from conjur-quickstart.
Hi @rpothier ,
I am trying to generate token in postman.
I tried
curl -H "$(docker-compose exec client conjur authn authenticate -H)" -k https://localhost:8443/whoami
But its giving Authorization missing in response.
I don't want to generate access token in cli and use that in api call instead I want to generate access token with the api request in postman.
from conjur-quickstart.
Hi @ravics09
For the issues with Postman, please refer to @john-odonnell comments and the links he provided.
from conjur-quickstart.
Hi @ravics09 Since the remaining questions are with Postman, can we close this issue?
from conjur-quickstart.
Related Issues (20)
- OpenSSL and Postgres immediately exit after docker-compose up -d HOT 14
- Issue with OpenSSL, Postgres_databse and Conjur_server containers HOT 2
- Issue with running "docker-compose exec client conjur policy load root policy/BotApp.yml > my_app_data" HOT 3
- The retrieved value is: Malformed authorization token HOT 3
- Quick start has daily pipeline run that goes through quick start flow
- Document troubleshooting of `Argument Error: invalid base64` HOT 5
- Quick start flow on website explains flow better at the start HOT 2
- Quick start pg container uses password auth
- Quickstart guide includes instructions for using persistent Conjur data
- Documentation includes clear instructions for adding or modifying environment variables in Conjur container
- Upgrade Postgres to version 10.14
- Stuck On Pulling Docker Image from docker-compose.yml HOT 5
- Data isnt getting written to admin_data file. Returns empty value for API key and password HOT 1
- Only works on MacOS
- Error in docker pull on mac m1 computer HOT 1
- Outdated and EOL PostgreSQL Version HOT 2
- API key for admin as password - password not accepted. HOT 3
- Containers not accessible outside of Docker HOT 1
- quick-start log format does not match conjur HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conjur-quickstart.