// Copyright 2019 Google LLC
//
// 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 globalflags contains global flags of binary, eg. Experimental.
package globalflags

import (
	"os"
)

var (
	// Experimental is a global flag determining if experimental features should be enabled.
	// Set from env var: `export FEDERATED_ACCESS_ENABLE_EXPERIMENTAL=true`
	Experimental = os.Getenv("FEDERATED_ACCESS_ENABLE_EXPERIMENTAL") == "true"
)

// Copyright 2019 Google LLC
//
// 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 globalflags contains global flags of binary, eg. Experimental.
package globalflags

import (
	"os"
)

var (
	// Experimental is a global flag determining if experimental features should be enabled.
	// Set from env var: `export FEDERATED_ACCESS_ENABLE_EXPERIMENTAL=true`
	Experimental = os.Getenv("FEDERATED_ACCESS_ENABLE_EXPERIMENTAL") == "true"

	// DisableAuditLog is a global flag determining if you want to disable audit log.
	// Set from env var: `export FEDERATED_ACCESS_DISABLE_AUDIT_LOG=true`
	DisableAuditLog = os.Getenv("FEDERATED_ACCESS_DISABLE_AUDIT_LOG") == "true"
)

Add a globalflag to disable audit logs
Add a globalflag to disable audit logs

audit logs may contains some sensitive information:

- Requester IP
- Token subject
- Token ID

If you want to disable audit log, you can use env
`export FEDERATED_ACCESS_DISABLE_AUDIT_LOG=true`

PiperOrigin-RevId: 294515600
Change-Id: Ifb5f2023b0903a01d7a3ce21f9b27045588a3063
