Giter Site home page Giter Site logo

ec-sdk-go's People

Contributors

changgyu-oh avatar darshanexp avatar darshanpandya86 avatar defstream avatar ssaluja4 avatar stevenpaz avatar thrashcollector avatar wdawg33 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

seanpm2001

ec-sdk-go's Issues

[Feature Request] Feature parity with UI for Origin Model

The EdgeCast SDK is missing a number of properties related to TLS settings in the Origin Model. As a result, the Edgecast Terraform provider does not support setting any of the affected options. These options exist in the Edgecast Portal UI, hence I would expect them to be available via the REST API / Go SDK.

Missing options for feature parity are:

  • Origin Group settings
    • "Use SNI for HTTPS Origin Requests"
    • "SNI Hostname"
    • "Disallow Self-Signed"
    • "Subject Public Key Info Pin Verification"

Related files:
https://github.com/EdgeCast/ec-sdk-go/blob/main/edgecast/origin/origin_models.go

[Feature Request] make the underlying http.Client replaceable

Is your feature request related to a problem? Please describe.
In my scenario, I need to replace the underlying http.Client used by the sdk with my company customized http.Client (for emitting mertics, using our company's http mesh, etc).

Describe the solution you'd like
There is a similar feature in aws's sdk here:

// WithHTTPClient sets a config HTTPClient value returning a Config pointer
// for chaining.
func (c *Config) WithHTTPClient(client *http.Client) *Config {
	c.HTTPClient = client
	return c
}

Describe alternatives you've considered
NA

Additional context
NA

[Feature Request]

Is your feature request related to a problem? Please describe.
Analytics unreachable via go sdk.

Describe the solution you'd like
Implement analytics client or expose basic ecclient.

Describe alternatives you've considered
I'm just gonna manually implement http reqs.

[BUG] Add Rate Rule doesn't work for OP Type EM

Describe the bug
The following rate rule does not work:

{
    "condition_groups": [
        {
            "conditions": [
                {
                    "target": {
                        "type": "REQUEST_METHOD"
                    },
                    "op": {
                        "type": "EM",
                        "values": [
                            "POST"
                        ]
                    }
                }
            ]
        }
    ],
    "customer_id": "CEA78",
    "disabled": false,
    "duration_sec": 5,
    "num": 10
}

To Reproduce
Steps to reproduce the behavior.
Call wafService.AddRateRule with:

rule := waf.RateRule{
		DurationSec: 5,
		Num:         10,
		CustomerID:  "CEA78",
		ConditionGroups: []waf.ConditionGroup{
			{
				Conditions: []waf.Condition{
					{
						Target: waf.Target{
							Type: "REQUEST_METHOD",
						},
						OP: waf.OP{
							Type:   "EM",
							Values: []string{"POST"},
						},
					},
				},
			},
		},
	}

Expected behavior
Rate rule is created

Screenshots

[DEBUG] POST https://qa-api.edgecast.com/v2/mcc/customers/CEA78/waf/v1.0/limit
failed AddRateRule: SendRequest failed: {"errors":[{"code":400,"message":"value is not accepted for operator type EM. You must use a values array"}],"success":false}

[BUG] updateAccessRule.go using old style invocation of wafService

Describe the bug
wafConfig := waf.NewConfig(*apiToken)
wafConfig.Logger = edgecast.NewStandardLogger()
wafService, err := waf.New(wafConfig)

instead of

idsCredentials := auth.OAuth2Credentials{} // WAF does not use these credentials
sdkConfig := edgecast.NewSDKConfig(*apiToken, idsCredentials)
wafService, err := waf.New(sdkConfig)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.