GithubHelp home page GithubHelp logo

auth0-deploy-extensions's People

Contributors

dependabot[bot] avatar faroceann avatar fyockm avatar luisbritos avatar lzychowski avatar pmalouin avatar santiagoaguiar avatar shawnmclean avatar shushen avatar zxan1285 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auth0-deploy-extensions's Issues

Feature request: Support for APIs

That is, this stuff:
Screenshot from 2019-05-28 09-33-20

I used the CLI deploy tool to output my current tenant's configuration to see if there's an obvious way to add the Auth0 API (including custom ones in the future) into my code config, but I don't see anything obvious. Here's what my output looks like:

Screenshot from 2019-05-28 09-39-02

I can't find anything in this directory tree is there anything for the APIs.

Node 12 Migration: Misconfiguration Error

After upgrading the node runtime in Auth0 to Node 12, the azure deployment script is broken. I have tried saving the settings multiple times, and uninstalling/reinstalling.

I end up with this error:

invalid_request: Client attempting to use unregistered redirect URI: https://[tenant].us8.webtask.io/[id]

webauthn guardian factor violates schema - Fails deployment

I exported our config from Auth0 using the CLI, then tried to redeploy it using the Github Deployment extension. When exporting it included guardian/factors/webauthn-roaming.json, but this was rejected by the schema as it's not present in the enum.

I see that WebAuthn is a BETA feature, but it's not ideal in terms of user experience to be unable to import something which was exported only moments beforehand. Perhaps BETA features should not be exported by default if it's not possible to import them?

Error message was:

Schema validation failed loading [
    {
        "keyword": "enum",
        "dataPath": ".guardianFactors[5].name",
        "schemaPath": "#/properties/guardianFactors/items/properties/name/enum",
        "params": {
            "allowedValues": [
                "sms",
                "push-notification",
                "otp",
                "email",
                "duo"
            ]
        },
        "message": "should be equal to one of the allowed values"
    }
]

Recent changes to cipher functionality have broken deployments

As of about a week ago, our deployments have failed with the error Libsodium error: Error: wrong secret key for the given ciphertext. My first thought was that someone must have accidentally changed our tenant's cipher secret. When I went to check it in the extension configuration menu I noticed that the 'Cipher Secret' input field is completely gone. We are using v2.10 of the extension.

Looking through the changelog and and commit history of this repo, I see that cipher secrets are being replaced with something called 'mappings'. Since we have not updated the extension to v3.0, I believe the latest release might have accidentally broken tenants configured with v2 installations.

Guidance on fixing this would be very appreciated. We would like to keep all configurations in version control (including encrypted secrets) instead of updating them in the management dashboard.

Mappings not working on Email Provider credentials

The problem I found was that trying to use the ##MAPPING## syntax for the smtp password did not work as expected using the Bitbucket deploy extension.

Here is the example provider.json I was trying to use:

{
  "name": "smtp",
  "enabled": true,
  "default_from_address": "[email protected]",
  "credentials": {
    "smtp_host": "smtp.sendgrid.net",
    "smtp_port": 587,
    "smtp_user": "apikey",
    "smtp_pass": "##SMTP_PASSWORD##"
  }
}

The configured mappings are

{
  "SMTP_PASSWORD": "super secret password"
}

After a "successful deployment the email sending fails due to incorrect password.

I cloned the repo and added some tests.
It looks like the "applyMapping" function in utils.js (server/lib/utils.js) is not correctly handling the credentials item/key.

const applyMappings = (item, mappings) => {
  const result = {};
  Object.keys(item).forEach((key) => {
    if (Array.isArray(item[key])) {
      const value = item[key];
      result[key] = JSON.parse(keywordReplace(JSON.stringify(value), mappings));
    } else {
      //START CHANGE
      if (typeof item[key] === 'string') {
        result[key] = keywordReplace(item[key], mappings);
      } else {
        //This code gets executed and correctly processes for emailProvider credentials
        result[key] = JSON.parse(keywordReplace(JSON.stringify(item[key]), mappings));
      }
      //END CHANGE
    }
  });
  console.log('applyMappings Result: ' + JSON.stringify(result));
  return result;
};

After making the above (not so nice!) change it processes the template correctly.

Removing a rule from repo does not delete rule in Auth0

As the title says:

  • create a new rule via git repo, push it- > it's created in Auth0
  • delete the rule in git repo, push it -> rule remains in Auth0

Tested with the Visual Studio extension using Azure DevOps.

I know you can use the .json-metafile and enable/disable rules, but I actually want the rule to be really deleted.

Please update changelog

The file CHANGELOG.md does not seem to have been updated since 2.0.0. Could you please either keep it updated or remove it? It is useful for preparing an update of an extension.

github deployment works with manual deploy only

we configured the github deployments extension (both the personal access token and the webhook) and it works when i click on the deploy button. after that on the deployments tab i see a success status with a green icon, the branch name (master) in the change column and my auth0 user (in auth0|id format). but after i push something to the repository (we usually merge a pull request), on the deployments page i see a failed status with a red icon, the hash of the commit and my github username.

the log says:

{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Invalid token",
  "attributes": {
    "error": "Invalid token"
  }
}

i checked the recent deliveries under the webhook and there is a successful request to the payload url, the status code is 202 and the response is

{
  "message": "Request accepted, deployment started."
}

versionDescriptor missing

I have setup the deployment extension to automatically deploy from our source control on Azure Dev Ops.
Initially it worked but, when we migrated to a branch per tenant pattern, it stopped working.
The web hook fires and deployment starts, but it fails with the error:

Value cannot be null.

Parameter name: versionDescriptor

It's also worth noting that, on the table showing deployment history, the branch field is empty. I have tried removing and reinstalling the extension, but the result is the same.

Updating to 2.7 Broke user logging

Hi, when I update to 2.7 from 2.4 it looks like user logging might be broken.

image

This is my request i'm sending from gitlab to auth0

{
  "object_kind": "push",
  "event_name": "push",
  "before": "5841f43269bbb284c2ed60939c15dc93212d3894",
  "after": "fc361d32ba9c9df8fb2e475b9096982df26d2eac",
  "ref": "refs/heads/testing",
  "checkout_sha": "fc361d32ba9c9df8fb2e475b9096982df26d2eac",
  "message": null,
  "user_id": 40,
  "user_name": "Cody McMichael",
  "user_username": "cody.mcmichael",
  "user_email": "",
  "user_avatar": "https://secure.gravatar.com/avatar/a6bdaf5fdbc03f2872aa53310f344ec7?s=80&d=identicon",
  "project_id": 210,

I noticed my email was empty here, but in the commit...

"commits": [
    {
      "id": "4225d1243f8d0efe8719783d9d1206e431f7db79",
      "message": "builds staging\n",
      "timestamp": "2018-08-07T00:37:40Z",
      "url": "https://in.thewardro.be/io/interactive/auth0-config/commit/4225d1243f8d0efe8719783d9d1206e431f7db79",
      "author": {
        "name": "Cody McMichael",
        "email": "[email protected]"
      },
      "added": [

It exists, I realize it could be an issue on my end as well, but was wondering if maybe you switch pulling the email address from the commit to the project block and this is why it no longer pulls?

Support multi-part repository name for GitLab

Currently we only use repositories with two-part names ( user/repo), see:

  • /*
    * Parse the repository.
    */
    const parseRepo = (repository = '') => {
    const parts = repository.split('/');
    if (parts.length === 2) {
    const [ user, repo ] = parts;
    return { user, repo };
    } else if (parts.length === 5) {
    const [ , , , user, repo ] = parts;
    return { user, repo };
    }
    throw new ArgumentError(`Invalid repository: ${repository}`);
    };
    )
  • /*
    * Get a project id by path.
    */
    const getProjectId = () => {
    const { user, repo } = utils.parseRepo(config('REPOSITORY'));
    const repository = `${user}/${repo}`;
    return getApi().Projects.all({ membership: true }).then(projects => {
    if (!projects) {
    return Promise.reject(new Error('Unable to determine project ID'));
    }
    const currentProject = projects.filter(f => f.path_with_namespace === repository);
    if (currentProject[0] && currentProject[0].id) {
    return currentProject[0].id;
    }
    return Promise.reject(new Error('Unable to determine project ID'));
    });
    };

GitLab, however, provides a "subgroups" feature (see https://docs.gitlab.com/ee/user/group/subgroups/#overview) which, when used, cause repository names to have more segments. E.g. a repository could be named mycompany/myteam/mysubteam/myrepo.

So, at least for GitLab, we cannot assume a two-part name for repositories.

Issue with bitbucket deployment extension

Hi Auth0 Team,

I've been unable to deploy using the bitbucket deployment extension. The only logs I receive is "Request failed with status code 401."

image

I've tried redeploying to an auth0 tenant with a previously successful deployment and still failed. No changes or configurations were changed for this auth0 tenant.

image

Any help would be appreciated.

BASE_DIR seems to not work

I might be misunderstanding something but if I want to store the tenant settings in a sub directory inside my repository I should use the BASE_DIR setting right?

My folder structure looks like this

image

and then in the GitHub deployments settings I set the BASE_DIR to services/auth0. But when I try deploying it fails with this error

{"message":"Not Found","documentation_url":"https://developer.github.com/v3/git/trees/#get-a-tree"}

The only other settings I've added to the config is the repo, branch and the token.

Thankful for any help!

Provide a means to deploy encrypted secrets for rules and DB scripts

I'd like to keep all my configuration and secrets in version control to minimize human error when updating auth0 settings.

Obviously we shouldn't store secrets in plain text. So that leaves encryption.

Something like sops or similar would be perfect. But presumably the keys should be coming from auth0. So auth0 might need to have some dashboard that says 'use these keys for this tenant'. But I'm sure there are many more ways to do this securely!

Copied from auth0-extensions/auth0-github-deploy#59

Deploy Roles

It would be nice to also deploy RBAC roles/permissions via this extension.

Can be implemented same as everything else.

I.E A roles folder - with with multiple json files:

some-role.json

{ "name": "Some Role", "description": "Some Role Description"}

or a single json array

roles.json

[
  { "name": "Some Role", "description": "Some Role Description"},
  { "name": "Another Role", "description": "Another Role Description"}
]

And something similar for permissions.

Thanks!

Missing GitHub Deploy (and all extensions) functionality to manage Anomaly Detection

As per the details in auth0/auth0-deploy-cli#250 (for auth0-deploy-cli) there is no functionality to manage Anomaly Detection via Configuration-as-Code extensions.

In the Dashboard Admin there is a standalone section "Anomaly Detection" to control those settings.

In the JSON files of either the GitHub deploy or the CLI deploy extensions there is a single brute_force_protection setting that is directly in the DB connection files (not a tenant-level setting as per the Dashboard Admin > Anomaly Detection > Brute-force Protection)

Question 1) How do we control the 3 x Anomaly Detection settings via JSON config?

  • Bot Detection
  • Brute-force Protection
  • Breached-password Detection

Question 2) How do the individual DB connection JSON brute_force_protection booleans relate to the tenant-level Dashboard Admin > Anomaly Detection > Brute-force Protection settings? There are multiple DB connections, but only a single Dashboard Admin tenant-level setting. Do these JSON settings have an effect?

BUG: Incorrect parsing of GitLab repository URL on v3.7

Steps to reproduce.

  1. Create a gitlab repository nested under a sub-group. For instance "https://gitlab.com/username/subgroupname/reponame"

  2. Install the gitlab deployments extension in the auth0 GUI, with this repo

  3. Go to the "deployments" tab, and click deploy

Expected behaviour

A deployment occurs

Actual behaviour

Network request returns with this error

{error: "ArgumentError", message: "Invalid repository: https://gitlab.com/username/subgroupname/reponame"}

It comes from this function which incorrectly parses the repository URL.

Splitting the subgroup repo URL gives 6 parts.
Screenshot 2021-01-06 at 17 56 29

I can open an MR to fix it, and properly identify the user and repo, unless for some reason auth0 doesn't want to support anything but 1 level of nesting in gitlab repositories.

It's also worth noting that I set up a different tenant and used the exact same configuration 1 month ago, and it worked perfectly fine with no issues. So this is strange. Perhaps this bug was introduced recently.

Feature request: support for MS Teams webhooks

The current implementation allows getting notifications about deployments on Slack.

More and more development teams are using Microsoft Teams(1), so it would be great if there is a possibility to get similar notifications there. The configuration could be very similar to Slack, like MS_TEAMS_INCOMING_WEBHOOK_URL.

Source:

  1. https://www.businessinsider.in/tech/enterprise/news/microsoft-teams-just-hit-20-million-daily-active-users-beating-its-rival-slack-once-again/articleshow/72129973.cms

Support for https://auth0.com/docs/hooks

Currently I see no way to manage and deploy hooks using deploy extension. Potentially because of hooks still being in "beta"?

Hoping for comments in this thread if support for hooks is planned.

Changes to tenant.yaml don't trigger update

I pushed changes to tenant.yaml. The hook runs but returns http 202 with the body:

{"message":"Request ignored, none of the Rules or Database Connection scripts were changed."}

The original tenant.yaml was generated by exporting with a0deploy yaml format.

Is or will this be supported?

Github integration is using deprecated Github APIs

Hi,
We started receiving notifications today that our Auth0 github integration is using deprecated Github APIs.


On February 5th, 2020 at 15:36 (UTC) your personal access token (XXXXX) using NodeJS HTTP Client was used as part of a query parameter to access an endpoint through the GitHub API:
.....snip

Please use the Authorization HTTP header instead, as using the `access_token` query parameter is deprecated.

Depending on your API usage, we'll be sending you this email reminder once every 3 days for each token and User-Agent used in API calls made on your behalf.
Just one URL that was accessed with a token and User-Agent combination will be listed in the email reminder, not all.

Visit https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters for more information.

Thanks,
The GitHub Team

Is there a roadmap and/or timeline for when this will be addressed with the Auth0 github integration? or will we need to switch over to using the deploy-cli-tool instead of this integration?

Any information would be greatly appreciated.

Feature Request: Sharing files between multiple tenants

Using the Github extension, share content between multiple tenants.

Having a separate BASE_DIR and config.json for each tenant is one option, however, there is no way (that I know) to have shared contents over multiple directories in this way without duplicating all the files. One solution was to set environment variables within the auth0 extension's dashboard separately for each tenant, but in many cases it would be nicer to have this configuration in source control as well.

This was also requested in the forums but if I'm not mistaken has not been followed here until now https://community.auth0.com/t/parameterized-deployments-using-github-deploy-tool/29527/4.

Suggestion: increase order automatically if no .json files submitted

Suggestion/feature request: assume I want to create multiple rules via github, and don't care about the order. Therefore usually I wouldn't create .json metafiles for the rules but just the .js files.

However, this does not work at the moment, because once I try to submit more than one rule without a .json file attached, I would get

{"statusCode":409,"error":"Conflict","message":"A rule with the same order already exists","errorCode":"rule_conflict"}

Would be nice if, in case no .json files are attached, the rules would just get added to the bottom of the list and the order just auto-increased.

Came across above issue when testing with the VisualStudio extension on Azure DevOps.

Suggestion: Please add support for Bitbucket Server

The Auth 0 Deploy Extension only supports Bitbucket Cloud currently. Please add support for Bitbucket Server as well. We have specific project constraints that prevent us from using Bitbucket Cloud. We would like to have our workflows with Auth0 as integrated as possible, and this would provide that capability.

Support for branding

Hi,

I'm migrating to using the GitHub Deployment Extension and one piece that's missing is the ability to configure branding.

I would assume an implementation may look like this:

/branding/settings.json

{
  "colors": {
    "primary": "#ffffff"
  },
  "logo_url": "http://blahblahblah"
}

as this is part of the Management API I assume it wouldn't be too difficult to add to the extension?

An alternative, more all-encompassing, way to solve this and any other missing pieces for SCM deployments may be to have a file in the git root to declare arbitrary Management API calls to happen whenever a deployment event runs? If there's already a way to do this, that would allow me to set branding values via git too.

Cheers,
Daniel

Azure Devops - Supported?

Hi,
Seems like the integration with Azure Devops is not really working.
Bottom line - configuration will not affect the basic error of accessing the prop "value" on undefined..
This fails in the Azure Devops API node lib..

Before I try and debug deeper on this - is this even supposed to work?

Question: How to grant Auth0 Management API scopes independent of the tenant?

Given each Auth0 tenant has a System API called 'Auth0 Management API', I was wondering if there is a generic way to get this API's audience.

I'm trying to create a repository which has the develop branch deployed to one Auth0 tenant and master to another, but if I specify the develop tenant's Auth0 Management API identifier in the grants/myorg.json file then the deployment fails in the other environment because the API is not found.

For example:

//myorg.json
{
  "client_id": "My Machine to Machine client",
    "audience": "https://{develop-myorg|myorg}.eu.auth0.com/api/v2/",
    "scope": [
      "read:users"
    ]
}

I'd like to use exactly the same Auth0 configuration in both environments so I can catch any configuration errors before they hit production.

BitBucket Deployment Extension v3.5 Not Working

We're using the Auth0 BitBucket Extension to deploy custom pages and rules; however, with version 3.5 of the extension whenever we do a deploy, we get a "success" result, but the rules and pages aren't created/updated and there are no "created", "updated", or "deleted" records in the logs for our rules and pages. We are able to successfully deploy with version 3.4 of the extension, so it appears that something has been broken (or there is additional Auth0 configuration required?) with version 3.5.

The expectation is to see something like this in the logs (example from v3.4 deploy):

{
 "rules": {
  "deleted": 0,
  "created": 0,
  "updated": 3
 },
 "pages": {
  "deleted": 0,
  "created": 0,
  "updated": 2
 }
}

But we get this (with deploy from v3.5 using the same BitBucket repository):

{}

Support for extensions?

This is sort of a chicken-and-egg problem, but it's a bit odd that we have to manually configure and update extensions when almost everything else can be placed into version control. So perhaps the scope could be all extensions except the CLI/deploy extensions themselves?

Eg: I plan to add extensions for real time logs, Sumologic log exports, and delegated admin to my tenants.

settings.json or database.json is not honored

This is very similar to auth0-extensions/auth0-source-control-extension-tools#58

I'm trying to configure my database connection (eg. disable signups) with the Github deploy extension.

Based on the readme in this repo, this extension supports something called settings.json in the database-connections folder.

However, there's no further documentation on what this file is and its expected schema.

So I tried the format mentioned in the above issue and the deploys are not honoring the settings.

What am I missing?

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.