-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Issue? #103
Comments
Thanks for giving Alcali a try! the docs should definitely be clearer. There's currently two different ways to authenticate Alcali against the Salt-Api.
Is your docker container reachable from the Salt-Master? If not, you should consider using the first option. |
I am going with the API endpoint, and the servers live on the same subnet and should have full communications enabled. |
Ok, here is the master's log in debug mode during a rest call: master_1 | 20:59:41 master.1 | [DEBUG ] Requesting URL http://web:8000/api/token/verify/ using POST method
master_1 | 20:59:41 master.1 | [DEBUG ] Using backend: tornado
master_1 | 20:59:41 master.1 | [DEBUG ] Response Status Code: 200
master_1 | 20:59:41 master.1 | [DEBUG ] eauth REST call returned 200: {'body': '{"admin":null}', 'dict': {'admin': None}, 'status': 200} And alcali's log: web_1 | [29/Oct/2019 15:59:41] "POST /api/token/verify/ HTTP/1.1" 200 14 Could you provide the same logs? Here is the curl -sSk -H 'Accept: application/json' -d username=admin -d password=b811a13c582fe24f287a1c13ba308f634f04159c http://web:8000/api/token/verify/ Where password is the user's token |
Response from the Salt Master when querying keys:
Response from the
So couple of oddities, I am running the docker instance with the GUI on port 8001 instead of 8000. Could this cause an issue? |
Unfortunately, according to your logs, it looks like the authentication is successful. That mean that the problem is after that, i''m guessing a database issue. an easy way to find out is:
It should show you the traceback. /!\ Be advise that anyone who can access the service while debug mode is on can probably retrieve all environment variable! Possible database issue: Is the db schema properly inserted ? (Salt would scream a lot if not but you never know) Have you run the database migration? What does |
So after enabling debug logging.....
Alcali check returns...
Looks like my docker build is hosed. Perhaps I should start over. |
When running when I ran
|
Ok, i got it: Do you have a user named admin defined in external_auth:
rest:
^url: http://web:8000/api/token/verify/
admin:
- .*
- '@runner'
- '@wheel' from the traceback, the auth to Alcali is ok, it's salt who's not happy. And i can reproduce the same behaviour. |
The PAM auth works correctly. I just ran some queries to the API. ALCALI is still not happy. |
And it just started working after a couple more restarts. Very Odd. I need to add the job returner for postgres next. Thanks for taking the time to assist! I will plan on using this tool, it may save me from getting SSE. |
This looks to be a promising alternative to salt enterprise. I am testing it out in docker.
Describe the bug
Getting 500 Error when refreshing key/minions. API socket returns OK. Not seeing any other data.
API Config:
Am I missing something in the API config?
Here is the docker env's.
![image](https://user-images.githubusercontent.com/44881775/67781620-12182780-fa3e-11e9-9fa8-a5bbd2be41ae.png)
The text was updated successfully, but these errors were encountered: