Message about invalid credentials with "{}" in config
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 236
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
Hi! For some reason, when using the "something{something_else}" construct in "roles/names", I get an error about invalid credentials.
ldap2pg.yml
Good config:
version: 6
postgres:
databases_query: [postgres]
privileges:
ro:
- __connect__
- __select_on_tables__
- __select_on_sequences__
- __usage_on_schemas__
- __usage_on_types__
rw:
- __temporary__
- __all_on_tables__
- __all_on_sequences__
ddl:
- __create_on_schemas__
rules:
- description: "..."
ldapsearch:
base: cn=admin,dc=test,dc=com
filter: ""
- description: "Setup static roles and grants."
roles:
- names:
- readers
options: NOLOGIN
- name: writers
parent: readers
options: NOLOGIN
- name: owners
parent: writers
options: NOLOGIN
- names:
- AA
options: NOLOGIN
grant:
- privilege: ro
role: readers
- privilege: rw
role: writers
- privilege: ddl
role: owners
However, when I change AA to AA{}, I get an error:
- names:
- AA{} # or "AA{}"
options: NOLOGIN
Expectations
I don't quite understand why this is happening, but I think it looks like a bug.
Verbose output of ldap2pg execution
Verbose output
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the supplied ldap2pg.yml, comparing the working AA value with AA{} and reviewing the attached verbose output. Trace how the names value is interpreted before the invalid-credentials error; done means the behavior is corrected or clearly explained for names containing {}.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100