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

Add Support For Tenant ACL Endpoints to NetworkACLManager #504

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

developerkunal
Copy link
Contributor

🔧 Changes

Added support for Tenant ACL Endpoints to NetworkACLManager, including the following methods:

Methods

  • Create
  • Read
  • Update
  • Delete
  • List

📝 Example Usage

package main

import (
	"context"
	"log"

	"github.com/auth0/go-auth0"
	"github.com/auth0/go-auth0/management"
)

func main() {
	mgmt, err := management.New("your-domain", management.WithClientCredentials("your-client-id", "your-client-secret"))
	if err != nil {
		log.Fatal(err)
	}

	networkACL := &management.NetworkACL{
		Description: auth0.String("some-description"),
		Active:      auth0.Bool(true),
		Priority:    auth0.Int(1),
		Rule: &management.NetworkACLRule{
			Action: &management.NetworkACLRuleAction{
				Block: auth0.Bool(true),
			},
			Match: &management.NetworkACLRuleMatch{
				IPv6Cidrs: &[]string{"2001:db8::/32"},
			},
			Scope: auth0.String("management"),
		},
	}

	err = mgmt.NetworkACL.Create(context.Background(), networkACL)
	if err != nil {
		log.Fatal(err)
	}
	log.Println("Network ACL has been created")
}

📚 References

🔬 Testing

  • Added relevant test cases for all endpoints.
  • Manual testing has also been conducted.

📝 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)

@developerkunal developerkunal requested a review from a team as a code owner February 13, 2025 06:14
@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.67%. Comparing base (88b14d3) to head (4ac6e30).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #504      +/-   ##
==========================================
+ Coverage   95.61%   95.67%   +0.05%     
==========================================
  Files          57       58       +1     
  Lines       11267    11421     +154     
==========================================
+ Hits        10773    10927     +154     
  Misses        373      373              
  Partials      121      121              

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

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