Giter Site home page Giter Site logo

armrest's People

Contributors

syepes avatar tongueroo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

armrest's Issues

Support CLI Auth Scoping

The CLI Auth method does not correctly handle getting the token with the adequate scope.

When authenticated with the CLI the current token does not allow reading the vault secrets as its not correctly scoped, it generates the following error when trying to get the secrets:

WARN: AKV10022: Invalid audience. Expected https://vault.azure.net, found: https://management.core.windows.net/.

After troubleshooting this issue I found that the get_access_token method would need to handle scoping so the token is generated for the needed API call.

Small hack: Note this fixes the armrest secret show command but breaks the rest as the token is no longer valid for other API calls like resource creation...

command = "az account get-access-token -o json"

Add this just after the above line:

if ENV['ARMREST_VAULT'] || ENV['ARM_VAULT']
  command = command + ' --scope "https://vault.azure.net/.default"'
end

Azure tags on backend storage not respected due to camelize the request

Hi,
Any particular reason that you set camelize(data) at line 67?
As I got an issue to set Azure Tags as it does not respect the case sensitivity and underscore for my azure backend tags
So as a workaround, I removed the line 67 on my local development machine and it works as expected
Thanks

def build_request(klass, path, data={})
data = camelize(data)
req = klass.new(path) # url includes query string and uri.path does not, must used url
set_headers!(req)
logger.debug "build_request data #{data}"

Armrest v0.1.3 CLI Auth is now not working anymore

Reproduce:

az login -u xxx -p xxx     # output account detail in json
armrest auth               # output Unable to authenticate
armrest auth msi           # output Unable to authenticate
armrest auth cli           # output Unable to authenticate

Testing Environment:
os: wsl ubuntu 20.04
version: armrest v0.1.3

I'm a newbie in ruby. I try to debug with vscode on windows but It's quite difficult cuz there are some issue with devkit.

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.