steve-community / steve

SteVe - OCPP server implementation in Java
GNU General Public License v3.0
782 stars 382 forks source link

switch to basic auth for API access #1545

Closed goekay closed 1 month ago

goekay commented 1 month ago

But why do you prefer basic auth instead of dedicated header or bearer token for api auth?

pls see https://github.com/steve-community/steve/issues/1540#issuecomment-2294698082

goekay commented 1 month ago

@juherr if you have no objections or no more comments, i want to merge this.

faculoyarte commented 1 month ago

Sorry guys, but I'm having trouble figuring out how to create an api_password on a user or set up admin users in the SteVe web UI. I had the API working previously using webapi.key = STEVE-API-KEY and webapi.value, but now I'm getting a 401 error. Could someone guide me on how to resolve this?"

image
goekay commented 1 month ago

hey @faculoyarte, the user you are showing on the screenshot is the end user, i.e. the customer that has an EV and RFID card and wants to use the stations.

the user we added in this PR is the web user, i.e. the operations person that manages stations, someone that belongs to a CPO maybe. this is the person that has access to steve's web ui to do things. the web user gets an api_password with this PR.

therefore, these two things are disconnected. there is another PR that will make it available to update/change properties of a web user. therefore, currently the only way to do is to directly modify database tables.

faculoyarte commented 1 month ago

Perfect, thanks. @goekay