cloudngfwgosdk

package module
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2024 License: MPL-2.0 Imports: 0 Imported by: 0

README

Palo Alto Networks cloudngfw

GoDoc

Package cloudngfw is a golang SDK for interacting with the Cloud NGFW AWS API.

Setup

This uses the AWS golang SDK under the hood, so it assumes you have credentials stored in the standard spots.

Example Script

package main

import (
    "context"
    "log"

    "github.com/paloaltonetworks/cloud-ngfw-aws-go"
)

func main() {
    var err error

    c := &awsngfw.Client{
        Host: "api.endpoint.com",
        Region: "us-east-1",
        LfaArn: "arn:aws:iam::123456789:role/CloudNgfwFirewallAdmin",
        LraArn: "arn:aws:iam::123456789:role/CloudNgfwRulestackAdmin",
    }
    if err = c.Setup(); err != nil {
        log.Fatal(err)
    }

    if err = c.RefreshJwts(context.TODO()); err != nil {
		log.Fatal(err)
	}

    log.Printf("Firewall JWT: %s", c.FirewallJwt)
    log.Printf("Rulestack JWT: %s", c.RulestackJwt)
}

Documentation

Index

Constants

View Source
const (
	LogQuiet = 1 << (iota + 1)
	LogLogin
	LogGet
	LogPost
	LogPatch
	LogPut
	LogDelete
	LogAction
	LogPath
	LogSend
	LogReceive
)

Logging constants.

View Source
const (
	CloudProviderAWS   = "aws"
	CloudProviderAzure = "azure"
)

Supported Cloud Providers

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
api
tag
url
ngfw
aws

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL