Skip to content

Issue 6227 - dsconf schema does not show inChain matching rule #6228

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

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

tbordaz
Copy link
Contributor

@tbordaz tbordaz commented Jun 17, 2024

Bug description:
The registered inChain MR does defined any matching rule
syntax (mr_syntax).
When dsconf reads the matching rules (read_schema_dse)
it only reports those which have OID and SYNTAX.
As a consequence InChain was not reported.

Fix description:
The syntax defines that assersion syntax that is
distinguished name. Add this syntax to the register
struct

relates: #6227

Reviewed by:

# Set referral
log.info("Use dsconf to check defined matching rules")
log.info(f'Command used: %{dsconf_cmd}')
proc = subprocess.Popen(dsconf_cmd, stdout=subprocess.PIPE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Thierry,
IMHO you should avoid to use subprocess as far as possible.
In this case you can simply check directly the schema:

schema = Schema(inst)
#mrs = [ str(mr) for mr in schema.get_matchingrules() ]
mrs = [ f"{mr.oid} {mr.names[0]}" for mr in schema.get_matchingrules() if len(mr.names) > 0 ]
print(mrs)
assert '1.2.840.113556.1.4.1941 inchainMatch' in mrs

Copy link
Contributor

@progier389 progier389 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Bug description:
	The registered inChain MR does defined any matching rule
	syntax (mr_syntax).
	When dsconf reads the matching rules (read_schema_dse)
	it only reports those which have OID and SYNTAX.
	As a consequence InChain was not reported.

Fix description:
	The syntax defines that assersion syntax that is
	distinguished name. Add this syntax to the register
	struct

relates: 389ds#6227

Reviewed by: Pierre Rogier (Thanks !)
@tbordaz tbordaz merged commit 1f41661 into 389ds:main Jun 24, 2024
9 checks passed
@tbordaz tbordaz added this to the 2.4 milestone Jun 24, 2024
tbordaz added a commit that referenced this pull request Jun 24, 2024
Bug description:
	The registered inChain MR does defined any matching rule
	syntax (mr_syntax).
	When dsconf reads the matching rules (read_schema_dse)
	it only reports those which have OID and SYNTAX.
	As a consequence InChain was not reported.

Fix description:
	The syntax defines that assersion syntax that is
	distinguished name. Add this syntax to the register
	struct

relates: #6227

Reviewed by: Pierre Rogier (Thanks !)
tbordaz added a commit that referenced this pull request Jun 24, 2024
Bug description:
	The registered inChain MR does defined any matching rule
	syntax (mr_syntax).
	When dsconf reads the matching rules (read_schema_dse)
	it only reports those which have OID and SYNTAX.
	As a consequence InChain was not reported.

Fix description:
	The syntax defines that assersion syntax that is
	distinguished name. Add this syntax to the register
	struct

relates: #6227

Reviewed by: Pierre Rogier (Thanks !)
tbordaz added a commit that referenced this pull request Jun 24, 2024
Bug description:
	The registered inChain MR does defined any matching rule
	syntax (mr_syntax).
	When dsconf reads the matching rules (read_schema_dse)
	it only reports those which have OID and SYNTAX.
	As a consequence InChain was not reported.

Fix description:
	The syntax defines that assersion syntax that is
	distinguished name. Add this syntax to the register
	struct

relates: #6227

Reviewed by: Pierre Rogier (Thanks !)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants