| | |
| | | |
| | | @Override |
| | | public StsCredentialsDTO getSTSCredentials() { |
| | | // CredentialsDTO credentials = ossService.getCredentials(); |
| | | CredentialsDTO credentials = minioStsUtils.getCredentials(); |
| | | CredentialsDTO credentials = ossService.getCredentials(); |
| | | // CredentialsDTO credentials = minioStsUtils.getCredentials(); |
| | | |
| | | //验证一下minio的临时凭证是否可用 |
| | | log.info("验证http临时凭证是否有效:{}", credentials); |
| | |
| | | DockConfiguration.bucket, |
| | | "test_object_http"); |
| | | |
| | | // log.info("验证https临时凭证是否有效:{}", credentials); |
| | | // execMinio(OssConfiguration.endpoint, |
| | | // credentials.getAccessKeyId(), |
| | | // credentials.getAccessKeySecret(), |
| | | // credentials.getSecurityToken(), |
| | | // OssConfiguration.region, |
| | | // DockConfiguration.bucket, |
| | | // "test_object_https"); |
| | | log.info("验证https临时凭证是否有效:{}", credentials); |
| | | execMinio(OssConfiguration.endpoint, |
| | | credentials.getAccessKeyId(), |
| | | credentials.getAccessKeySecret(), |
| | | credentials.getSecurityToken(), |
| | | OssConfiguration.region, |
| | | DockConfiguration.bucket, |
| | | "test_object_https"); |
| | | |
| | | return StsCredentialsDTO.builder() |
| | | //机场媒体库minio配置信息用代理地址,桶用机场的桶。 |
| | | .endpoint(DockConfiguration.endpoint) |
| | | .endpoint(OssConfiguration.endpoint) |
| | | .bucket(DockConfiguration.bucket) |
| | | .credentials(credentials) |
| | | .provider(DockConfiguration.provider) |