Jck_H_ui
(Jck H'ui)
June 12, 2023, 11:40am
1
I'm trying to create a role using the command as described in the doc's ( I'm using elastic 8.7)
curl -X POST "localhost:9200/_security/role/myprofile?pretty" -H 'Content-Type: application/json' -d'
{
"indices": [
{
"names": [ "events-*" ],
"privileges": [ "read","write" ]
}
]
}
'
But it results in an error, "no handler found for uri [/_security/role/myprofile?pretty] and method [POST].
Any idea what Im doing wrong?
leandrojmp
(Leandro Pereira)
June 12, 2023, 12:52pm
2
Can you remove the ?pretty
part of the URL and try again?
Jck_H_ui
(Jck H'ui)
June 12, 2023, 12:53pm
3
Yes sorry should have mentioned that. I tried without the pretty, but same error
Jck_H_ui
(Jck H'ui)
June 12, 2023, 12:56pm
4
I have a basic license, is that maybe the problem? Naa, then it should have mentioned something along those lines right?
What does your node configuration look like? Do you have security enabled?
leandrojmp
(Leandro Pereira)
June 12, 2023, 12:59pm
6
No, it works with the Basic license, but I think @Christian_Dahlqvist has a point and I just saw it now.
On the request you are not authenticating yourself, there is no user/password.
Do you have security enabled?
Jck_H_ui
(Jck H'ui)
June 12, 2023, 1:04pm
7
Yep @Christian_Dahlqvist you are spot on. I was pretty sure I did have it enabled but turns out I disabled it again at some point! Thanks for pointing me in the right direction.
system
(system)
Closed
July 10, 2023, 1:04pm
8
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.