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

feat: SAML2 integration v1 readiness #2868

Merged
merged 20 commits into from
Jul 4, 2024
Merged

feat: SAML2 integration v1 readiness #2868

merged 20 commits into from
Jul 4, 2024

Conversation

sfc-gh-jmichalak
Copy link
Collaborator

@sfc-gh-jmichalak sfc-gh-jmichalak commented Jun 13, 2024

  • Introduce snowflake_saml2_resource (to be consistent with docs and sql) and deprecate snowflake_saml_resource
  • Fix migration guide
  • Fix checking errors for invalid terraform configurations
  • Added one more test for scim migrator
  • Altered SDK:
    • improved enums
    • marked some fields as optional
    • introduced enums for some fields (they were not here before because of confusing docs, added to docs improvements list)
    • added new issues to objects lists

Test Plan

  • acceptance tests

References

https://docs.snowflake.com/en/sql-reference/sql/create-security-integration-saml2

Copy link

Integration tests success for afe7fc6bb43da7e66fd33ec533b1b284141d3f43

Copy link

Integration tests failure for 1318b9348d62824fab4ee77738dd27496852de76

examples/resources/snowflake_saml2_integration/import.sh Outdated Show resolved Hide resolved
examples/resources/snowflake_saml2_integration/resource.tf Outdated Show resolved Hide resolved
pkg/resources/custom_diffs.go Outdated Show resolved Hide resolved
pkg/resources/saml2_integration.go Outdated Show resolved Hide resolved
pkg/resources/saml2_integration.go Outdated Show resolved Hide resolved
pkg/resources/saml2_integration.go Show resolved Hide resolved
Copy link
Collaborator

@sfc-gh-asawicki sfc-gh-asawicki left a comment

Choose a reason for hiding this comment

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

Gave a few comments but I am worried because the schema and handling in create/update are inconsistent with database/warehouse (and I think that some of the use cases won't work correctly with the current setup). Let's talk.

examples/resources/snowflake_saml2_integration/resource.tf Outdated Show resolved Hide resolved
pkg/acceptance/helpers/common.go Outdated Show resolved Hide resolved
pkg/resources/custom_diffs.go Outdated Show resolved Hide resolved
pkg/resources/custom_diffs.go Outdated Show resolved Hide resolved
pkg/resources/custom_diffs.go Outdated Show resolved Hide resolved
pkg/resources/scim_integration_acceptance_test.go Outdated Show resolved Hide resolved
pkg/sdk/security_integrations_def.go Outdated Show resolved Hide resolved
pkg/sdk/security_integrations_def.go Show resolved Hide resolved
Copy link

Integration tests failure for 5fe1bccd5eed3b48af6951416ff93817819a2294

Copy link

gitguardian bot commented Jun 27, 2024

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link

Integration tests failure for 2b9bc6f3513fabae366bb89af58efad0b8eba461

Copy link

Integration tests failure for 9a4acde0ba38637b33fcbbfd6266f4e703c02a42

Copy link

github-actions bot commented Jul 1, 2024

Integration tests failure for f49e7aca00ea52577f124a82a65a88b25ad30c3c

Copy link

github-actions bot commented Jul 1, 2024

Integration tests failure for b9209c612a86c3b2f6cffab9ee5d95ecd3b175c7

Copy link

github-actions bot commented Jul 2, 2024

Integration tests failure for 2620ea6b7523f8b7953601852b9ca346ba7f9f05

Copy link

github-actions bot commented Jul 2, 2024

Integration tests failure for d93db50437a2b4407abb80ffa2666ee95f286e88

Copy link

github-actions bot commented Jul 2, 2024

Integration tests failure for c904c2272423b9bd6121356e92ef9a42b0c3eff5

@sfc-gh-asawicki sfc-gh-asawicki self-requested a review July 2, 2024 10:52
pkg/resources/saml2_integration.go Outdated Show resolved Hide resolved
pkg/resources/saml2_integration.go Show resolved Hide resolved
pkg/resources/saml2_integration.go Outdated Show resolved Hide resolved
pkg/schemas/saml_security_integration.go Outdated Show resolved Hide resolved
pkg/resources/common.go Outdated Show resolved Hide resolved
pkg/schemas/saml_security_integration.go Outdated Show resolved Hide resolved
pkg/resources/helpers.go Outdated Show resolved Hide resolved
pkg/resources/saml2_integration.go Outdated Show resolved Hide resolved
pkg/resources/saml2_integration.go Outdated Show resolved Hide resolved
// These are all identity sets, needed for the case where:
// - previous config was empty (therefore Snowflake defaults had been used)
// - new config have the same values that are already in SF
if !d.GetRawConfig().IsNull() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this can be also made a bit nicer after #2900

Copy link
Collaborator

Choose a reason for hiding this comment

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

Addressed in #2912

pkg/resources/saml2_integration.go Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jul 2, 2024

Integration tests failure for 7b33e11b7a65b2cf3c8f78c11ca566444365eda2

# Conflicts:
#	pkg/resources/helpers.go
#	pkg/resources/scim_integration.go
#	pkg/resources/scim_integration_acceptance_test.go
#	v1-preparations/CHANGES_BEFORE_V1.md
Copy link
Collaborator Author

@sfc-gh-jmichalak sfc-gh-jmichalak left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

github-actions bot commented Jul 3, 2024

Integration tests failure for 3b908672b7bb1bb0c424a375f7d89c700e98c14d

@sfc-gh-asawicki sfc-gh-asawicki self-requested a review July 4, 2024 09:42
sfc-gh-asawicki
sfc-gh-asawicki previously approved these changes Jul 4, 2024
@@ -301,8 +301,8 @@ func TestForceNewIfChangeToEmptySet(t *testing.T) {
}, {
name: "non-empty to empty",
stateValue: map[string]string{
"value.#": "1",
"value.0": "foo",
"value.#": "1",
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add some comment to explain this funny stuff (in the next PR)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Addressed in #2912

# Conflicts:
#	v1-preparations/ESSENTIAL_GA_OBJECTS.MD
@sfc-gh-jcieslak sfc-gh-jcieslak merged commit d0c136d into main Jul 4, 2024
8 of 9 checks passed
@sfc-gh-jcieslak sfc-gh-jcieslak deleted the jmichalak-si-v1 branch July 4, 2024 13:38
Copy link

github-actions bot commented Jul 4, 2024

Integration tests failure for 0c96ab1ca28c01fd5a42ed06b80bb4290bca6d19

sfc-gh-jcieslak added a commit that referenced this pull request Jul 9, 2024
<!-- Feel free to delete comments as you fill this in -->
<!-- summary of changes -->
Changes:
- New oauth integration for partner applications added
- Examples added
- Migration Guide was added in the previous pr (oauth for custom
clients)
- Common description for not detecting external changes and using manual
re-creation added
- Left TODOs for UNSETs not working
- Address things from
#2868

## Test Plan
<!-- detail ways in which this PR has been tested or needs to be tested
-->
* [x] acceptance tests
<!-- add more below if you think they are relevant -->

## References
<!-- issues documentation links, etc  -->

*
[CREATE](https://docs.snowflake.com/en/sql-reference/sql/create-security-integration-oauth-snowflake)
sfc-gh-jcieslak pushed a commit that referenced this pull request Jul 10, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.93.0](v0.92.0...v0.93.0)
(2024-07-10)


### 🎉 **What's new:**

* Add OAUTH integration for custom clients
([#2908](#2908))
([d9b557f](d9b557f))
* Add oauth integration for partner applications
([#2912](#2912))
([91788e5](91788e5))
* Add support for cortex search service
([#2860](#2860))
([43aa89f](43aa89f))
* API Authentication integration v1 readiness
([#2898](#2898))
([91931da](91931da))
* External Oauth integration v1 readiness
([#2907](#2907))
([ed237c3](ed237c3))
* Generate show outputs with mappers
([#2886](#2886))
([1cada88](1cada88))
* Introduce security integrations datasource
([#2892](#2892))
([7f6c657](7f6c657))
* SAML2 integration v1 readiness
([#2868](#2868))
([d0c136d](d0c136d))
* SCIM integration v1 readiness
([#2846](#2846))
([269df6b](269df6b))
* Security integrations datasource v1 readiness
([#2913](#2913))
([d10474a](d10474a))
* standard database v1 readiness
([#2842](#2842))
([3c11953](3c11953))
* Warehouse redesign final touches
([#2900](#2900))
([0eab636](0eab636))
* Warehouse redesign part1
([#2864](#2864))
([6664457](6664457))
* Warehouse redesign part2
([#2887](#2887))
([1aaf417](1aaf417))
* Warehouse redesign part3
([#2890](#2890))
([873a1ed](873a1ed))
* Warehouse redesign part4
([#2893](#2893))
([d525fd9](d525fd9))


### 🔧 **Misc**

* Add documentation on unset and defaults
([#2882](#2882))
([85a7836](85a7836))
* apply minor database changes
([#2872](#2872))
([6ccac59](6ccac59))
* Apply new resource conventions to scim integration
([#2891](#2891))
([e11e608](e11e608))
* Improve generator template organization
([#2820](#2820))
([5035e2f](5035e2f))
* Nuke stale objects
([#2869](#2869))
([9c4a117](9c4a117))
* Show a possible solution for
[#2877](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2877)
([#2878](#2878))
([6fb437b](6fb437b))
* Validations cleanup and old grants removal
([#2884](#2884))
([05b7eee](05b7eee))


### 🐛 **Bug fixes:**

* Add disclaimers and fix tests
([#2905](#2905))
([1deaedc](1deaedc))
* Fix cortex search service
([#2904](#2904))
([763d06c](763d06c))
* use suppressQuoting to fix stage file_format permadiff
([#2885](#2885))
([fd70f6e](fd70f6e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: snowflake-release-please[bot] <105954990+snowflake-release-please[bot]@users.noreply.github.com>
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