Skip to content

fix authentication-tests-darwinssl #1400

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

Conversation

kevinAlbs
Copy link
Collaborator

Summary

Replace check of existence of /etc/krb5.conf with presence of kinit command.
Fixes failing authentication-tests-darwinssl task.

Changes verified with this patch build: https://spruce.mongodb.com/version/64ff5b602fbabe466a2b35d1/

Background & Summary

The condition in prepare-kerberos checked for existence of /etc/krb5.conf:

if test "${keytab|}" && [[ -f /etc/krb5.conf ]]; then

A patch build with more logging showed the /etc/krb5.conf file does not exist on the macOS host:

/etc/krb5.conf does not exist

man kinit on macOS notes the expected default path to be /etc/krb5.conf:

     KRB5_CONFIG
             The file name of krb5.conf, the default being /etc/krb5.conf.

It appears not to be necessary to check for the existence of /etc/krb5.conf.

Instead: check for presence of `kinit` command.
`/etc/krb5.conf` does not appear present on macOS hosts.
Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@kevinAlbs kevinAlbs marked this pull request as ready for review September 12, 2023 15:51
@@ -1961,7 +1961,7 @@ tasks:
- func: bootstrap-mongo-orchestration
- func: run-mock-kms-servers
- func: run-tests
- name: earthly-build-and-test
- name: earthly-build-check
Copy link
Contributor

Choose a reason for hiding this comment

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

Confirming, is the inclusion of this change intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. I think the Evergreen config was not regenerated after the task was renamed in 6e6546b.

@kevinAlbs kevinAlbs merged commit 2cb9ff6 into mongodb:master Sep 13, 2023
kevinAlbs added a commit that referenced this pull request Sep 13, 2023
* silence `kinit` check

* do not assume existence of `krb5.conf`

Instead: check for presence of `kinit` command.
`/etc/krb5.conf` does not appear present on macOS hosts.

* regenerate Evergreen config
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.

2 participants