public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: kdevops@lists.linux.dev, cel@kernel.org
Subject: Re: [RFC PATCH] terraform/OCI: Grab secrets from ~/.oci/config
Date: Fri, 4 Apr 2025 11:06:34 -0700	[thread overview]
Message-ID: <Z_Afqnmv8yDNJMQQ@bombadil.infradead.org> (raw)
In-Reply-To: <2040a867-11ae-4661-b140-5a87602e1f4c@oracle.com>

On Fri, Apr 04, 2025 at 12:10:49PM -0400, Chuck Lever wrote:
> On 4/4/25 11:52 AM, Luis Chamberlain wrote:
> > On Thu, Apr 03, 2025 at 01:55:27PM -0400, Chuck Lever wrote:
> >> On 4/3/25 10:49 AM, cel@kernel.org wrote:
> >>> From: Chuck Lever <chuck.lever@oracle.com>
> >>>
> >>> Instead of storing authentication secrets in the kdevops .config
> >>> file, pull them from the authentication profiles already set up
> >>> in ~/.oci/config. This arrangement is more secure.
> >>>
> >>> terraform's API authentication is now managed outside of Kconfig,
> >>> as is done with AWS. An update to docs/kdevops-terraform.md to
> >>> follow.
> >>>
> >>> Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
> >>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> >>> ---
> >>>  .../templates/oci/terraform.tfvars.j2         |  5 +---
> >>>  scripts/terraform.Makefile                    |  4 ---
> >>>  terraform/oci/kconfigs/Kconfig.identity       | 27 +++++++------------
> >>>  terraform/oci/provider.tf                     |  7 ++---
> >>>  terraform/oci/vars.tf                         | 25 ++++-------------
> >>>  5 files changed, 17 insertions(+), 51 deletions(-)
> >>>
> >>> The tenancy OCID, user OCID, fingerprint, and private key path
> >>> Kconfig settings would no longer be needed. This patch fits
> >>> somewhere in the middle of the 00/31 series, replacing several of
> >>> those patches.
> >>
> >> It appears that, though undocumented, terraform's azurerm provider can
> >> also pull its authentication material from a home directory dot file
> >> (~/.azure/azureProfile.json). Proof-of-concept tested and working.
> > 
> > Nice!
> > 
> >> Google already works this way. So we can use the "secrets are stored
> >> outside of kdevops' .config file" for all four major cloud providers.
> > 
> > Do we want a Kconfig SUPPORTS_SEPARATE_CLOUD_SECRETS or do we want to
> > just implicate this is a requirement?
> 
> IMHO "separate secrets" is just more secure overall, and I generally
> lean towards not enabling users to select a lower level of security
> unless we absolutely have to.

I'm all in favor of simply making a rule to never allow secrets on .config.
That lets us scale for CIs and enable reprodducible ci-workloads safely
and collection of results on kdevops-results-archive.

> - kdevops in Google and AWS already support only separate secrets
> - kdevops in Azure was not working (for other reasons) so there's no
>   backwards compatibility issue if we change it

Perfect.

> Only possible issue is with OCI, and this series makes enough changes
> that anyone who upgrades kdevops will need to rework their .config
> anyway.

Makes sense.

> The series has a patch at the end (maybe I didn't post that) that
> updates docs/kdevops-terraform.md.
> 
> 
> On a related topic, if we ever want to fully support running the kdevops
> /control host/ in the cloud, terraform supports an authentication
> mechanism that just uses the local instance's service principal, so
> no extra authentication material is needed for provisioning the test
> runners as separate cloud instances. Interesting to consider.

Sorry I failed to understand this, what is mean by separate cloud
instances?

  Luis

  reply	other threads:[~2025-04-04 18:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03 14:49 [RFC PATCH] terraform/OCI: Grab secrets from ~/.oci/config cel
2025-04-03 17:55 ` Chuck Lever
2025-04-04 15:52   ` Luis Chamberlain
2025-04-04 16:10     ` Chuck Lever
2025-04-04 18:06       ` Luis Chamberlain [this message]
2025-04-04 18:24         ` Chuck Lever
2025-04-04 18:28           ` Luis Chamberlain
2025-04-04 18:35             ` Chuck Lever
2025-04-04 19:19               ` Luis Chamberlain
2025-04-04 20:34                 ` Chuck Lever
2025-04-04 15:49 ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z_Afqnmv8yDNJMQQ@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox