Error Code and Authentication for Self-Signed Certificates
Error Code
Error Scene |
Return Code |
Error Message |
|---|---|---|
Missing client_id |
8101 |
The client_id parameter is missing. |
Missing authorization_code |
8102 |
The authorization_code parameter is missing. |
Missing grant_type |
8103 |
The grant_type parameter is missing. |
Missing client_secret |
8104 |
The client_secret parameter is missing. |
Missing access_token |
8105 |
The access_token parameter is missing. |
Missing refresh_token |
8106 |
The refresh_token parameter is missing. |
Missing redirect_uri |
8107 |
The redirect_uri parameter is missing. |
Invalid client_id |
8201 |
The client_id parameter is invalid. |
Invalid authorization_code |
8202 |
The authorization_code parameter is invalid. |
Invalid grant_type |
8203 |
The grant_type parameter is invalid. |
Invalid client_secret |
8204 |
The client_secret parameter is invalid. |
Invalid access_token |
8205 |
The access_token parameter is invalid. |
Invalid refresh_token |
8206 |
The refresh_token parameter is invalid. |
Invalid redirect_uri |
8207 |
The redirect_uri parameter is invalid. |
Internal resource error |
8500 |
There is internal resource error on the server. |
Self-signed Certificate
- Generate a root CA certificate.
1 2
openssl genrsa -out ca.key 4096 openssl req -new -x509 -sha256 -days 360 -subj "/C=CN/CN=code-server-ca" -key ca.key -out ca.crt
- Generate a server CSR.
1 2
openssl genrsa -out cert.key 4096 openssl req -new -sha256 -key cert.key -subj "/C=CN/CN=code-server" -out cert.csr
- Generate a server certificate.
Replace IP:x.x.x.x in the following command with the IP address of the deployed master node.
1openssl x509 -req -extfile <(cat /etc/pki/tls/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:code-server,IP:xx.xx.xx.xx")) -extensions SAN -CA ca.crt -CAkey ca.key -CAcreateserial -days 360 -in cert.csr -out cert.crt
- Replace the original server certificate with cert.csr generated in 2 and cert.crt generated in 3. Import the root certificate path generated in 1 to the DevKit installation script for certificate authentication.