subscription

package
v0.0.0-...-217a8d3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package subscription contains functionality to handle AuthDB access, including authorization to subscribe to the Pubsub topic for AuthDB change notifications, and updating ACLs to the AuthDB in Google Cloud Storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorize

func Authorize(ctx *router.Context) error

Authorize authorizes the caller to: - subscribe to AuthDB change notifications from Pubsub; and - read the AuthDB from Google Cloud Storage.

Response body:

{
	'topic': <full name of Pubsub topic for AuthDB change notifications>,
	'authorized': true,
	'gs': {
		'auth_db_gs_path': <same as auth_db_gs_path in SettingsCfg proto>,
		'authorized': true
	}
}

func CheckAccess

func CheckAccess(ctx *router.Context) error

CheckAccess queries whether the caller is authorized to: - subscribe to AuthDB change notifications from Pubsub; and - read the AuthDB from Google Cloud Storage.

Response body:

{
	'topic': <full name of Pubsub topic for AuthDB change notifications>,
	'authorized': <true if the caller is allowed to subscribe to it>,
	'gs': {
		'auth_db_gs_path': <same as auth_db_gs_path in SettingsCfg proto>,
		'authorized': <true if the caller should be able to read GS files>
	}
}

func Deauthorize

func Deauthorize(ctx *router.Context) error

Deauthorize revokes the caller's authorization to: - subscribe to AuthDB change notifications from Pubsub; and - read the AuthDB from Google Cloud Storage.

Response body:

{
	'topic': <full name of Pubsub topic for AuthDB change notifications>,
	'authorized': false,
	'gs': {
		'auth_db_gs_path': <same as auth_db_gs_path in SettingsCfg proto>,
		'authorized': false
	}
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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