shield

package
v0.0.0-...-5984307 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package shield .

Copyright © 2021 Walter Beller-Morales engineering@koala.io

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package shield .

Copyright © 2021 Walter Beller-Morales engineering@koala.io

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package shield .

Copyright © 2021 Walter Beller-Morales engineering@koala.io

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LookupResponse

type LookupResponse struct {
	Type           string
	Record         string
	AsnName        string
	AsnNumber      int
	AsnDescription string
	AsnCountry     string
	AsnIPv4Count   int
}

LookupResponse represents lookup information for IP addresses and AS Numbers

type Shield

type Shield struct {
	// contains filtered or unexported fields
}

Shield .

func NewShield

func NewShield() *Shield

NewShield creates a new client and loads the default AWS config

func (*Shield) CreateBlockList

func (s *Shield) CreateBlockList(asn string) error

CreateBlockList will lookup all the IPv4 prefixes registered to a specific ASN and create a WAF classic IP set

func (*Shield) DisableBlockList

func (s *Shield) DisableBlockList(asn string) error

DisableBlockList will remove a WAF classic IP set for a specific ASN (if it exists) from the SHIELD WAF Rule

func (*Shield) EnableBlockList

func (s *Shield) EnableBlockList(asn string) error

EnableBlockList will add a WAF classic IP set for a specific ASN (if it exists) to the SHIELD WAF Rule

func (*Shield) ListIPSets

func (s *Shield) ListIPSets() ([]WAFClassicIPSetResponse, error)

ListIPSets returns all the WAF Classic IP Sets

func (*Shield) Lookup

func (s *Shield) Lookup(record string) (LookupResponse, error)

Lookup returns information about IP addresses and AS Numbers

type WAFClassicIPSetResponse

type WAFClassicIPSetResponse struct {
	ID   string
	Name string
	IPs  []*waf.IPSetDescriptor
}

WAFClassicIPSetResponse represents a set of IP lists from AWS WAF Classic

type WAFClassicRuleResponse

type WAFClassicRuleResponse struct {
	ID              string
	Name            string
	MetricName      string
	PredicatesCount int
}

WAFClassicRuleResponse represents a Rule in AWS WAF Classic

Jump to

Keyboard shortcuts

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