Skip to content
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

[Bug] Adapter error when FIPS mode is enabled #602

Closed
2 tasks done
chrischin478 opened this issue Mar 14, 2024 · 4 comments · Fixed by #604
Closed
2 tasks done

[Bug] Adapter error when FIPS mode is enabled #602

chrischin478 opened this issue Mar 14, 2024 · 4 comments · Fixed by #604
Labels
bug Something isn't working

Comments

@chrischin478
Copy link
Contributor

chrischin478 commented Mar 14, 2024

Is this a new bug in dbt-athena?

  • I believe this is a new bug in dbt-athena
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

The Athena adapter is failing for the following error when FIPS is enabled, for example on RHEL>=8.6:

ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS

dbt-core had a recent bug dbt-labs/dbt-core#6900 addressing this that was resolved. I think the fix for this would be changing this:

https://github.com/dbt-athena/dbt-athena/blob/40855b36249c9b890bab3c6d77afe88555ad6a85/dbt/adapters/athena/connections.py#L73-L75

To use dbt utils md5:

from dbt.utils import md5

@property
def unique_field(self) -> str:
    return f"athena-{md5(self.s3_staging_dir)}"

Expected Behavior

dbt-athena runs without FIPS error

Steps To Reproduce

No response

Environment

- OS: RHEL8.6 with FIPS mode enabled
- Python: 3.10.12
- dbt: 1.7.10
- dbt-athena-community: 1.7.2

Additional Context

No response

@chrischin478 chrischin478 added the bug Something isn't working label Mar 14, 2024
@chrischin478 chrischin478 changed the title [Bug] Adapter doesn't run when FIPS mode is enabled [Bug] Adapter error when FIPS mode is enabled Mar 14, 2024
@nicor88
Copy link
Contributor

nicor88 commented Mar 14, 2024

@chrischin478 could you try to propose a fix based on your finding?

@chrischin478
Copy link
Contributor Author

@nicor88 I've included the proposal in the description. Let me know what you think.

@nicor88
Copy link
Contributor

nicor88 commented Mar 14, 2024

I've see it, I think is fine to try out what you suggested - that's why I wrote to try to propose a PR, because we can actually verify via functional tests that all works fine.

Looking at dbt-core code seems that the use md5(self.project_name), but what you suggested:

from dbt.utils import md5

@property
def unique_field(self) -> str:
    return f"athena-{md5(self.s3_staging_dir)}"

it's totally fine for me.

@chrischin478
Copy link
Contributor Author

chrischin478 commented Mar 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants