Giter Club home page Giter Club logo

akeyless-action's Introduction

Hi there ๐Ÿ‘‹, my name is Lance, I'm a professional nerd.

Blog Blog Badge Twiter Twitter Badge LinkedIn Linkedin Badge

  • โšก Fun fact: I am also a Microsoft MVP, see https://bit.ly/LanceMVP
  • ๐Ÿ”ญ Iโ€™m currently working on cool .NET MAUI stuff
  • ๐ŸŒฑ Iโ€™m currently learning Spanish
  • ๐Ÿ’ฌ Ask me about anything .NET, Hololens/Mixed Reality, IoT, Azure, MAUI, CI-CD
  • ๐Ÿ“ซ How to reach me: Twitter is best. If you don't have twitter, shoot me en email... lance at dvlup dot com
  • ๐Ÿ˜„ Pronouns: Him/He

Day Job

I am the Manager of Technical Support at Progress Software. My team and I provide technical assistance for developers using the Telerik and Kendo UI devtools. I absolutely love writing code and watching it come alive in the user's hands. My passion is mostly UI, but also the things that powers that UI... from backend APIs to AI-powered fun.

As an example, check out Flusher, the complete system that flushes the toilet for my cat using Windows IoT, SignalR, Azure Custom Vision and Xamarin Forms to Flush a Toilet.

GitHub Stats

akeyless-action's People

Contributors

cmancone avatar dependabot[bot] avatar lancemccarthy avatar lumixximul avatar netserheruty avatar snyk-bot avatar tsvetomir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

akeyless-action's Issues

Complains about AWS SDK version

(node:2781) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use node --trace-warnings ... to show where the warning was created)

[Feature] Print operational status messages using info.

The output of the action is too clean, there's nothing that confirms it was successful other than the outputs being available in the following step/job.

This enhancement would re-introduce the core.info messages to the action:

  • core.info('Getting secrets...');
  • core.info('Exporting secrets...');
  • core.info('Complete');

This will help diagnostics in consumer workflows that are encountering issues, and the underlying SDK's output doesn't throw off their investigations.

Dynamic Secrets - Add Feature Flag To Automatically Export Separate Variables

As mentioned in #9, I need to add additional ligic inside the Action itself that will automatically separate the dynamic secret's keys and export the value separately.

as it stands, you need to export them yourself using a JSON tool like jq to split them up and then >> $GITHUB_ENV to export the values into safe env variables.

If you ar ehere looking for this feature, you can still achieve the same end result by adding a step directly after your AK,eyless step/

   - name: Fetch dynamic secrets from AKeyless
      id: fetch-dynamic-secrets
      uses: LanceMcCarthy/akeyless-action@v2
      with:
        access-id: 'p-fq3afjjxv839'
        dynamic-secrets: '{"/path/to/dynamic/secret":"aws_dynamic_secrets"}'

  # EXPORT DYNAMIC SECRETS TO SEPARATE ENVIRNMENT VARIABLES
    - name: Export Secrets to Environment
      run: echo '${{ steps.fetch-dynamic-secrets.outputs.aws_dynamic_secrets }}' | jq -r 'to_entries|map("AWS_\(.key)=\(.value|tostring)")|.[]' >> $GITHUB_ENV

# NOW YOU CAN ACCESS THEM INDIVIDUALLY
    - name: Verify Vars
      run: |
        echo "access_key_id: ${{ env.AWS_access_key_id }}"
        echo "id: ${{ env.AWS_id }}"
        echo "secret_access_key: ${{ env.AWS_secret_access_key }}"
        echo "security_token: ${{ env.AWS_security_token }}"
        echo "ttl_in_minutes: ${{ env.AWS_ttl_in_minutes }}"
        echo "type: ${{ env.AWS_type }}"
        echo "user: ${{ env.AWS_user }}"
``

Dynamic Secret Outputs

In 2.3.0, the dynamic secrets appear to only be present in environment variables and not in job outputs.

image

This issue is to investigate the problem, confirm any problems and provide any fixes.

Error: Client could not be found in cache

There is an ongoing issue I am investigating where attempting to fetch any secret from the Akeyless portal/gateway results in the following error

getDynamicSecretValue Failed: 
{
  "status":400,
  "body":{"error":"Client could not be found in cache"},
  ....
}

This seems to be specific to the JavaScript SDK's comms with the Akeyless server. I am in communication with the Akeyless team and will update this Issue once more information is known.

Emergency Need

If you have a mission-critical situation, then you can use the alternative approach of using the REST API. Here's an example of using PowerShell to get the secret using a REST call:

$AKEYLESS_ACCESS_ID="p-123456"
$AKEYLESS_ACCESS_KEY="get-me-from-akeyless-portal"

$AuthBody = @{ "access-id" = "p-123456"; "$AKEYLESS_ACCESS_ID" = "$AKEYLESS_ACCESS_KEY"; "access-type" = "access_key"; }

$AuthParameters = @{ Method = "POST"; Uri =  "https://api.akeyless.io/auth"; Body = ($AuthBody | ConvertTo-Json); ContentType = "application/json"; }

$token = (Invoke-RestMethod @AuthParameters).token
$SecretBody = @{ "name" = "/my-secret/path"; "token" = "$token"; }
$SecretParameters = @{ Method = "POST"; Uri =  "https://api.akeyless.io/get-dynamic-secret-value"; Body = ($SecretBody | ConvertTo-Json); ContentType = "application/json"; }
$dynamicSecret = Invoke-RestMethod @SecretParameters

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.