<div dir="ltr"><div dir="ltr">On Thu, Dec 22, 2022 at 8:42 AM Marcin Niemyjski via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg175267512063699441">




<div dir="ltr">
<div><br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
is it safer than keeping credentials in mapfile or is it just another way of providing them to mapserver?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Please tell me. Is keeping credentials in mapfile optimal and safe way?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div></div></div></blockquote><div><br></div><div>I would try to avoid ever using AWS credentials directly as environment variables.  Instead, let GDAL use properly configured credentials from ~/.aws/config or when running on an EC2 instance, GDAL can fetch instance profile credentials.  If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are accidentally leaked, an attacker could get whatever access is allowed through those keys.  In cases where those keys allow IAM access, bad things can happen.  Most tooling (the AWS CLI, AWS SDKs, GDAL) should allow for authentication without ever having to copy/paste AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY directly.  See the section starting "Several authentication methods are possible" from <a href="https://gdal.org/user/virtual_file_systems.html#vsis3-aws-s3-files">https://gdal.org/user/virtual_file_systems.html#vsis3-aws-s3-files</a></div><div><br></div><div>Cheers,</div><div>Pete</div></div></div>