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

GetBinds Getting abstract bindings will fail #115

Open
HUAHUAI23 opened this issue Mar 5, 2025 · 1 comment
Open

GetBinds Getting abstract bindings will fail #115

HUAHUAI23 opened this issue Mar 5, 2025 · 1 comment

Comments

@HUAHUAI23
Copy link

conf

frontend fe_8080_https
  enabled
  mode http
  bind abns@haproxy-8080-https name internal accept-proxy
  log-format "%ci:%cp\ [%t]\ %ft\ %b/%s\ %Th/%Ti/%TR/%Tq/%Tw/%Tc/%Tr/%Tt\ %ST\ %B\ %CC\ %CS\ %tsc\ %ac/%fc/%bc/%sc/%rc\ %sq/%bq\ %hr\ %hs\ %{+Q}r\ %[var(txn.coraza.id)]\ spoa-error:\ %[var(txn.coraza.error)]\ waf-hit:\ %[var(txn.coraza.fail)]"
  filter spoe engine coraza config /home/ubuntu/simple-waf/haproxy/spoe/coraza-spoa.yaml
  http-request redirect location %[var(txn.coraza.data)] code 302 if { var(txn.coraza.action) -m str redirect }
  http-request deny deny_status 403 if { var(txn.coraza.action) -m str deny }
  http-request silent-drop if { var(txn.coraza.action) -m str drop }
  http-request deny deny_status 500 if { var(txn.coraza.error) -m int gt 0 }
  default_backend p8080_backend
  http-response redirect location %[var(txn.coraza.data)] code 302 if { var(txn.coraza.action) -m str redirect }
  http-response deny deny_status 403 if { var(txn.coraza.action) -m str deny }
  http-response silent-drop if { var(txn.coraza.action) -m str drop }
  http-response deny deny_status 500 if { var(txn.coraza.error) -m int gt 0 }

code

	fe_http_bind := &models.Bind{
		BindParams: models.BindParams{
			Name:        "internal",
			AcceptProxy: true,
		},
		Address: fmt.Sprintf("abns@haproxy-%d-http", port),
	}

not set Port because it is abstract binding

	_, https_binds, err := s.confClient.GetBinds("frontend", fmt.Sprintf("fe_%d_https", site.ListenPort), transaction.ID)

The above code returns an empty list

@HUAHUAI23
Copy link
Author

Also GetBinds does not support crt
bind abns@haproxy-9001-https accept-proxy ssl crt "@sites/a_com_cert"

DefaultCrtList only

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

No branches or pull requests

1 participant