Authentication
Our system implements a security mechanism that utilizes token-based authorization to ensure secure resource access. The authentication process involves using an Authorization header, following the token scheme. This section outlines the steps required for obtaining and using the authentication token to access protected resources.
Security Best Practices
To ensure the highest security standards, all communication with our services should be performed over encrypted channels (for example, using SSL/TLS protocols). Unencrypted or insecure connections are not recommended and may be rejected by the server. In particular, please make sure to always connect to the secure port (e.g., 443) assigned for encrypted traffic.
Note: Attempting to establish unencrypted connections or using insecure credentials may cause authentication or connection failures. Always utilize encrypted methods and secure credentials.
Obtaining the Token
To obtain the authentication token, please contact our IT-Support team (itsupport@match-trade.com). This token acts as a digital key, granting access to the system’s resources for the duration of the token’s validity. Tokens are valid until revoked. The default gRPC port is 8083.
Using the Token
Include the token as a Bearer credential in every authenticated request.
REST: Authorization: Bearer <Your_Token_Here>
gRPC: uses metadata instead of HTTP headers. Pass the same value as the authorization metadata key: authorization: Bearer <Your_Token_Here>
Code Example (Python)
Below is a generic example of how to add the Authorization metadata in a gRPC client application. The implementation may vary depending on the programming language and gRPC library used.
import grpc
# Insecure channel (internal/private hosts only)
channel = grpc.insecure_channel("mtr-broker-api:8083")
# Secure channel (public hostnames — recommended)
channel = grpc.secure_channel("grpc-broker-api-v2.your-domain.com", grpc.ssl_channel_credentials())
# Prepare metadata with the authorization token
metadata = [("authorization", "Bearer <Your_Token_Here>")]
# Create a stub and make a call
stub = YourServiceStub(channel)
response = stub.YourRpcMethod(request, metadata=metadata)
Replace <Your_Token_Here> with the actual token, and adjust YourServiceStub and YourRpcMethod to match your gRPC service definition.
On this page
- Authentication