Skip to content

Commit

Permalink
Merge pull request #1656 from SanjalKatiyar/https_s3
Browse files Browse the repository at this point in the history
Use https for S3 Route
  • Loading branch information
openshift-merge-bot[bot] authored Nov 5, 2024
2 parents 1295245 + 6f793b2 commit aefc9b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions packages/odf/components/s3-browser/noobaa-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const NoobaaS3Provider: React.FC<NoobaaS3ProviderType> = ({
SecretModel,
NOOBAA_ADMIN_SECRET
);
// ToDo: Configure ConsolePlugin proxy instead of using Route

const [routeData, routeLoaded, routeError] = useSafeK8sGet<K8sResourceKind>(
RouteModel,
NOOBAA_S3_ROUTE
Expand All @@ -47,8 +47,7 @@ export const NoobaaS3Provider: React.FC<NoobaaS3ProviderType> = ({
const [noobaaS3, noobaaS3Error]: [S3Commands, unknown] = React.useMemo(() => {
if (!_.isEmpty(secretData) && !_.isEmpty(routeData)) {
try {
// ToDo: Remove this once ConsolePlugin proxy is configured
const endpoint = `http://${routeData.spec.host}`;
const endpoint = `https://${routeData.spec.host}`;
const accessKeyId = atob(secretData.data?.[NOOBAA_ACCESS_KEY_ID]);
const secretAccessKey = atob(
secretData.data?.[NOOBAA_SECRET_ACCESS_KEY]
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/s3/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class S3Commands extends S3Client {
});
}

// Bucket command members (alphabetical order)
// Bucket command members
createBucket: CreateBucket = (input) =>
this.send(new CreateBucketCommand(input));

Expand Down
4 changes: 2 additions & 2 deletions packages/shared/src/s3/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
GetObjectTaggingCommandOutput,
} from '@aws-sdk/client-s3';

// Bucket command types (alphabetical order)
// Bucket command types
export type CreateBucket = (
input?: CreateBucketCommandInput
) => Promise<CreateBucketCommandOutput>;
Expand Down Expand Up @@ -58,7 +58,7 @@ export type PutBucketTags = (
input?: PutBucketTaggingCommandInput
) => Promise<PutBucketTaggingCommandOutput>;

// Object command types (alphabetical order)
// Object command types
export type DeleteObjects = (
input: DeleteObjectsCommandInput
) => Promise<DeleteObjectsCommandOutput>;
Expand Down

0 comments on commit aefc9b8

Please sign in to comment.