mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #473] Create a CLI tool to change password #179
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#179
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @behrooz on GitHub (Mar 16, 2023).
Original GitHub issue: https://github.com/lldap/lldap/issues/473
I cant find any sample how to create a user and change password with graphql
could you please help me to write one
I am working with python graphql and i want to request to lldap change password graphql
thanks
@nitnelave commented on GitHub (Mar 16, 2023):
Currently there's no way to change the password of a user via GraphQL, and I don't plan on adding one:
The reasoning for that is that:
What I could do is provide a client binary that sets a user's password through OPAQUE from the command line: you give it the server url, the admin credentials, and the user credentials you want to set, and it does the safe password negotiation with the server. Would that work for you?
@behrooz commented on GitHub (Mar 16, 2023):
Thank you for clear answer, bu i need and api to create a user with password or change it, i think i should look for another way to fit me
@nitnelave commented on GitHub (Mar 16, 2023):
As I mentioned, one option is to have a separate binary that'll do the OPAQUE negotiation for you. You can already create a user with GraphQL, without password. The flow (from python) would then look like:
subprocess.run(['lldap_set_password', '--jwt_token', token, '--user', user, '--password', password, '--url', server_url])).Would that work for you?
@behrooz commented on GitHub (Mar 16, 2023):
That is good but id dont understand simple binary
what is subprocess ? how to install and run it ?
@nitnelave commented on GitHub (Mar 16, 2023):
You mentioned you're using python, right?
subprocessis part of the standard library (https://docs.python.org/3/library/subprocess.html), and it's the most common way of calling external binaries (external programs). For instance, if you want to callls -llike you would do from the shell, you can dosubprocess.run(["ls", "-l"])in your python code. This will call from your python code the external programlswith the option-l.Similarly, if we had a program called
lldap_set_password, you could write what I wrote above to call and run it, like you would be able to do from your shell (from the shell you'd writelldap_set_password --jwt_token abcdef --user tom --password superPa55w0rd --url lldap.my_server.com).This program doesn't exist yet (
lldap_set_password), but I'm proposing to create it as a way to solve this problem.@behrooz commented on GitHub (Mar 16, 2023):
So it should work inside docker container when i call lldap_set_password itself
but it return
bash: lldap_set_password: command not found
should i run it in specific directory ?
@nitnelave commented on GitHub (Mar 16, 2023):
As I mentioned just above: This program doesn't exist yet, but I'm proposing to create it as a way to solve this problem.
@nitnelave commented on GitHub (Mar 17, 2023):
Let's keep the issue open to track the creation of the tool.