返回码与自签证书通过验证
错误码
错误场景 |
返回代码 |
错误信息 |
---|---|---|
client_id缺失 |
8101 |
缺少参数client_id |
authorization_code缺失 |
8102 |
缺少参数authorization_code |
grant_type缺失 |
8103 |
缺少参数grant_type |
client_secret缺失 |
8104 |
缺少参数client_secret |
access_token缺失 |
8105 |
缺少参数access_token |
refresh_token缺失 |
8106 |
缺少参数refresh_token |
redirect_uri缺失 |
8107 |
缺少参数redirect_uri |
client_id无效 |
8201 |
参数client_id非法 |
authorization_code无效 |
8202 |
参数authorization_code非法 |
grant_type无效 |
8203 |
参数grant_type非法 |
client_secret无效 |
8204 |
参数client_secret非法 |
access_token无效 |
8205 |
参数access_token非法 |
refresh_token无效 |
8206 |
参数refresh_token非法 |
redirect_uri无效 |
8207 |
参数redirect_uri非法 |
内部资源错误 |
8500 |
服务器内部资源错误 |
自签证书
- 产生根CA证书。
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
- 产生服务器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
- 产生服务器证书。
以下命令中IP地址需替换为部署的Master节点的IP地址。
1
openssl x509 -req -extfile <(cat /etc/pki/tls/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:code-server,IP:x.x.x.x")) -extensions SAN -CA ca.crt -CAkey ca.key -CAcreateserial -days 360 -in cert.csr -out cert.crt
- 将操作步骤二中生成的cert.csr与操作步骤三中生成的cert.crt替换原有服务器证书,将操作步骤一中产生的根证书路径传入DevKit安装脚本中用于证书验证。
父主题: DevKit SSO认证流程与接口定义