@@ -96,17 +96,49 @@ impl BlobStorageConfig {
9696 }
9797}
9898
99+ #[ derive( Clone , Debug , Serialize , Deserialize ) ]
100+ pub struct S3BlobStorageCredentialsConfig {
101+ pub access_key_id : String ,
102+ pub secret_access_key : String ,
103+ pub provider_name : String ,
104+ }
105+
106+ impl S3BlobStorageCredentialsConfig {
107+ pub fn new (
108+ access_key_id : impl Into < String > ,
109+ secret_access_key : impl Into < String > ,
110+ provider_name : impl Into < String > ,
111+ ) -> Self {
112+ Self {
113+ access_key_id : access_key_id. into ( ) ,
114+ secret_access_key : secret_access_key. into ( ) ,
115+ provider_name : provider_name. into ( ) ,
116+ }
117+ }
118+ }
119+
120+ impl SafeDisplay for S3BlobStorageCredentialsConfig {
121+ fn to_safe_string ( & self ) -> String {
122+ let mut result = String :: new ( ) ;
123+ let _ = writeln ! ( & mut result, "access key id: ****" ) ;
124+ let _ = writeln ! ( & mut result, "secret access key: ****" ) ;
125+ let _ = writeln ! ( & mut result, "provider name: {}" , self . provider_name) ;
126+ result
127+ }
128+ }
129+
99130#[ derive( Clone , Debug , Serialize , Deserialize ) ]
100131pub struct S3BlobStorageConfig {
101132 pub retries : RetryConfig ,
102133 pub region : String ,
103134 pub object_prefix : String ,
104135 pub aws_endpoint_url : Option < String > ,
136+ pub aws_credentials : Option < S3BlobStorageCredentialsConfig > ,
137+ pub aws_path_style : Option < bool > ,
105138 pub compilation_cache_bucket : String ,
106139 pub custom_data_bucket : String ,
107140 pub oplog_payload_bucket : String ,
108141 pub compressed_oplog_buckets : Vec < String > ,
109- pub use_minio_credentials : bool ,
110142 pub initial_component_files_bucket : String ,
111143 pub components_bucket : String ,
112144 pub plugin_wasm_files_bucket : String ,
@@ -123,6 +155,13 @@ impl SafeDisplay for S3BlobStorageConfig {
123155 if let Some ( endpoint_url) = & self . aws_endpoint_url {
124156 let _ = writeln ! ( & mut result, "aws_endpoint_url: {endpoint_url}" ) ;
125157 }
158+ if let Some ( aws_credentials) = & self . aws_credentials {
159+ let _ = writeln ! ( & mut result, "aws_credentials:" ) ;
160+ let _ = writeln ! ( & mut result, "{}" , aws_credentials. to_safe_string_indented( ) ) ;
161+ }
162+ if let Some ( path_style) = & self . aws_path_style {
163+ let _ = writeln ! ( & mut result, "aws_path_style: {path_style}" ) ;
164+ }
126165 let _ = writeln ! (
127166 & mut result,
128167 "compilation cache bucket: {}" ,
@@ -143,11 +182,6 @@ impl SafeDisplay for S3BlobStorageConfig {
143182 "compressed oplog buckets: {:?}" ,
144183 self . compressed_oplog_buckets
145184 ) ;
146- let _ = writeln ! (
147- & mut result,
148- "use MinIO credentials: {}" ,
149- self . use_minio_credentials
150- ) ;
151185 let _ = writeln ! (
152186 & mut result,
153187 "initial component files bucket: {}" ,
@@ -174,8 +208,9 @@ impl Default for S3BlobStorageConfig {
174208 oplog_payload_bucket : "oplog-payload" . to_string ( ) ,
175209 object_prefix : "" . to_string ( ) ,
176210 aws_endpoint_url : None ,
211+ aws_credentials : None ,
212+ aws_path_style : None ,
177213 compressed_oplog_buckets : vec ! [ "oplog-archive-1" . to_string( ) ] ,
178- use_minio_credentials : false ,
179214 initial_component_files_bucket : "golem-initial-component-files" . to_string ( ) ,
180215 components_bucket : "component-store" . to_string ( ) ,
181216 plugin_wasm_files_bucket : "golem-plugin-wasm-files" . to_string ( ) ,
0 commit comments