GRPC Core  9.0.0
Macros | Functions
alts_credentials.cc File Reference
#include <grpc/support/port_platform.h>
#include "src/core/lib/security/credentials/alts/alts_credentials.h"
#include <cstring>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include "src/core/lib/security/credentials/alts/check_gcp_environment.h"
#include "src/core/lib/security/security_connector/alts/alts_security_connector.h"

Macros

#define GRPC_CREDENTIALS_TYPE_ALTS   "Alts"
 
#define GRPC_ALTS_HANDSHAKER_SERVICE_URL   "metadata.google.internal.:8080"
 

Functions

grpc_channel_credentialsgrpc_alts_credentials_create_customized (const grpc_alts_credentials_options *options, const char *handshaker_service_url, bool enable_untrusted_alts)
 This method creates an ALTS channel credential object with customized information provided by caller. More...
 
grpc_server_credentialsgrpc_alts_server_credentials_create_customized (const grpc_alts_credentials_options *options, const char *handshaker_service_url, bool enable_untrusted_alts)
 This method creates an ALTS server credential object with customized information provided by caller. More...
 
grpc_channel_credentialsgrpc_alts_credentials_create (const grpc_alts_credentials_options *options)
 This method creates an ALTS channel credential object. More...
 
grpc_server_credentialsgrpc_alts_server_credentials_create (const grpc_alts_credentials_options *options)
 This method creates an ALTS server credential object. More...
 

Macro Definition Documentation

◆ GRPC_ALTS_HANDSHAKER_SERVICE_URL

#define GRPC_ALTS_HANDSHAKER_SERVICE_URL   "metadata.google.internal.:8080"

◆ GRPC_CREDENTIALS_TYPE_ALTS

#define GRPC_CREDENTIALS_TYPE_ALTS   "Alts"

Function Documentation

◆ grpc_alts_credentials_create()

grpc_channel_credentials* grpc_alts_credentials_create ( const grpc_alts_credentials_options options)

This method creates an ALTS channel credential object.

It is used for experimental purpose for now and subject to change.

  • options: grpc ALTS credentials options instance for client.

It returns the created ALTS channel credential object.

◆ grpc_alts_credentials_create_customized()

grpc_channel_credentials* grpc_alts_credentials_create_customized ( const grpc_alts_credentials_options options,
const char *  handshaker_service_url,
bool  enable_untrusted_alts 
)

This method creates an ALTS channel credential object with customized information provided by caller.

  • options: grpc ALTS credentials options instance for client.
  • handshaker_service_url: address of ALTS handshaker service in the format of "host:port". If it's nullptr, the address of default metadata server will be used.
  • enable_untrusted_alts: a boolean flag used to enable ALTS in untrusted mode. This mode can be enabled when we are sure ALTS is running on GCP or for testing purpose.

It returns nullptr if the flag is disabled AND ALTS is not running on GCP. Otherwise, it returns the created credential object.

◆ grpc_alts_server_credentials_create()

grpc_server_credentials* grpc_alts_server_credentials_create ( const grpc_alts_credentials_options options)

This method creates an ALTS server credential object.

It is used for experimental purpose for now and subject to change.

  • options: grpc ALTS credentials options instance for server.

It returns the created ALTS server credential object.

◆ grpc_alts_server_credentials_create_customized()

grpc_server_credentials* grpc_alts_server_credentials_create_customized ( const grpc_alts_credentials_options options,
const char *  handshaker_service_url,
bool  enable_untrusted_alts 
)

This method creates an ALTS server credential object with customized information provided by caller.

  • options: grpc ALTS credentials options instance for server.
  • handshaker_service_url: address of ALTS handshaker service in the format of "host:port". If it's nullptr, the address of default metadata server will be used.
  • enable_untrusted_alts: a boolean flag used to enable ALTS in untrusted mode. This mode can be enabled when we are sure ALTS is running on GCP or for testing purpose.

It returns nullptr if the flag is disabled and ALTS is not running on GCP. Otherwise, it returns the created credential object.