Skip to content

feat: curated blocklist go-auth0 v1 support#830

Merged
KartikJha merged 2 commits into
v1from
go-auth0-v1-curated-blocklist
Jul 22, 2026
Merged

feat: curated blocklist go-auth0 v1 support#830
KartikJha merged 2 commits into
v1from
go-auth0-v1-curated-blocklist

Conversation

@KartikJha

@KartikJha KartikJha commented Jul 20, 2026

Copy link
Copy Markdown

Add Auth0-managed curated blocklist support to Network ACLs

🔧 Changes

Adds support for Auth0-managed curated blocklist categories on Network ACL rules.

  • Add the Auth0Managed *[]string field to the NetworkACLRuleMatch struct (JSON key auth0_managed), allowing rules to match against Auth0-curated blocklist categories such as auth0.icloud_relay_proxy.
  • Regenerate the corresponding GetAuth0Managed() []string accessor in management.gen.go.

Usage:

acl := &management.NetworkACL{
    Description: auth0.String("block icloud relay proxy"),
    Active:      auth0.Bool(true),
    Priority:    auth0.Int(1),
    Rule: &management.NetworkACLRule{
        Action: &management.NetworkACLRuleAction{Block: auth0.Bool(true)},
        Match: &management.NetworkACLRuleMatch{
            Auth0Managed: &[]string{"auth0.icloud_relay_proxy"},
        },
        Scope: auth0.String("authentication"),
    },
}
err := api.NetworkACL.Create(context.Background(), acl)

🔬 Testing

  • Added TestNetworkACLManager_CreateWithAuth0Managed, which creates a Network ACL with an Auth0Managed match, reads it back, and asserts the field round-trips correctly. Backed by an HTTP recording (TestNetworkACLManager_CreateWithAuth0Managed.yaml).
  • Added the generated accessor test TestNetworkACLRuleMatch_GetAuth0Managed covering the non-nil, empty, and nil-receiver cases.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@KartikJha
KartikJha requested a review from a team as a code owner July 20, 2026 06:01
@codecov-commenter

codecov-commenter commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.85%. Comparing base (c17c732) to head (8c75398).

Additional details and impacted files
@@           Coverage Diff           @@
##               v1     #830   +/-   ##
=======================================
  Coverage   96.85%   96.85%           
=======================================
  Files          62       62           
  Lines       11205    11209    +4     
=======================================
+ Hits        10853    10857    +4     
  Misses        234      234           
  Partials      118      118           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KartikJha
KartikJha merged commit 0f01754 into v1 Jul 22, 2026
4 checks passed
@KartikJha
KartikJha deleted the go-auth0-v1-curated-blocklist branch July 22, 2026 19:41
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