bastion | 🔒Secure Bastion implemented as Docker Container running Alpine Linux with Google Authenticator & DU | Continuous Deployment library

 by   cloudposse Shell Version: 1.0.0 License: Apache-2.0

kandi X-RAY | bastion Summary

kandi X-RAY | bastion Summary

bastion is a Shell library typically used in Devops, Continuous Deployment, Docker applications. bastion has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This project is maintained and funded by Cloud Posse, LLC. Like it? Please let us know by leaving a testimonial!. We're a DevOps Professional Services company based in Los Angeles, CA. We ️ Open Source Software. We offer paid support on all of our projects. Check out our other projects, follow us on twitter, apply for a job, or hire us to help with your cloud strategy and implementation.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              bastion has a low active ecosystem.
              It has 594 star(s) with 111 fork(s). There are 38 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 3 open issues and 26 have been closed. On average issues are closed in 329 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of bastion is 1.0.0

            kandi-Quality Quality

              bastion has no bugs reported.

            kandi-Security Security

              bastion has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              bastion is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              bastion releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of bastion
            Get all kandi verified functions for this library.

            bastion Key Features

            No Key Features are available at this moment for bastion.

            bastion Examples and Code Snippets

            No Code Snippets are available at this moment for bastion.

            Community Discussions

            QUESTION

            Looping through a list when building group_vars in ansible
            Asked 2021-Jun-02 at 15:09

            I'm rather new to ansible and would like to deploy prometheus-grok-exporter (via ansible-grok-exporter role) with a specific configuration for all my nodes that run the cacti application.

            My inventory is like this:

            ...

            ANSWER

            Answered 2021-Jun-02 at 14:51

            You can't use this kind of for loop in a variables file or a playbook - it only works in template files. To acheive what you're after, you can use product filters, as described https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#products

            In your example, you would have:

            Source https://stackoverflow.com/questions/67804918

            QUESTION

            ssh AWS ec2 bastion permission denied
            Asked 2021-Jun-02 at 11:08

            When I try to connect to an EC2 in a private network through a bastion server I get this message:

            ...

            ANSWER

            Answered 2021-May-29 at 22:51

            There is likely no user on the remote system called 'username'. Make sure both systems have the same username and public key.

            Source https://stackoverflow.com/questions/67756234

            QUESTION

            Can't access Amazon Neptune via SSH tunnel Sigv4
            Asked 2021-May-25 at 06:52

            I'm trying to access Neptune cluster status endpoint from an SSH tunnel. I can hit it without issue on my bastion host, but when doing via ssh tunnel, I get:

            https://localhost:8182/status

            ...

            ANSWER

            Answered 2021-May-25 at 06:52

            When using SSH tunnel for accessing Neptune using localhost, one need to explicitly pass Neptune endpoint as host header for signing the request. Consider below example for awscurl:

            Source https://stackoverflow.com/questions/67646911

            QUESTION

            Why am I getting authentication events, when IAM recommendation shows that the roles of service account are not used?
            Asked 2021-May-24 at 18:35

            I am new to google cloud. I am trying to minimize the roles of Service accounts to improve security. The role assigned to my SA is of Compute Viewer, but the recommendation shows that these are excessive roles and are not used from 90 days.

            But when I opened Metrics Explorer it shows that SA has authentication events of every date till now. Now, I am confused if SA is being authenticated, which role it is using as the only role (Computer Viewer) is not used from 90 days.

            The SA is of bastion host.

            ...

            ANSWER

            Answered 2021-May-24 at 18:26

            The warning means that the service account has permissions that have not been used. The message does not mean that the "service account" has not been used.

            Tip: A Bastion Host should not have any permissions except for logging (Stackdriver Logging and Stackdriver Monitoring).

            Source https://stackoverflow.com/questions/67675738

            QUESTION

            GCP service to ssh and run a script on 10 Virtual Machines in GCE without using a bastion VM
            Asked 2021-May-22 at 08:14

            In a GCP project, I have 10 virtual machines in GCE (runs sshd).

            I have a need to run a script on each of the 10 virtual machines (in GCE) once an hour. I would like this to be centralized because number of VMs will grow over time and I do not want to have to do this on every single VM. In addition, I would want to analyze the data I get back in a central place.

            However, I do not want to use a bastion VM, because I would like a cloud-native solution that does not require maintaining yet another virtual machine.

            Which GCP service can do this?

            I have looked into Cloud Run and Cloud Composer. I was not able to do this with Cloud Run, although that may be my own lack of familiarity with the product. Cloud Composer seems like a overkill.

            ...

            ANSWER

            Answered 2021-May-21 at 17:00

            As @JohnHanley mentioned, you will need to write code or scripts to launch commands on VMs dynamically because GCP doesn't have the type of service you require.

            You may want to consider Cloud Identity-Aware Proxy (IAP) as it can be used for building your solution:

            IAP helps to protect SSH access to your VMs without needing to provide your VMs with public IP addresses, and without having to set up bastion hosts.

            For instance, you can check the enable IAP on Compute Engine guide.

            You can also create a feature request for Google to consider implementing this solution.

            Source https://stackoverflow.com/questions/67626612

            QUESTION

            Ansible nested definition and reference issues
            Asked 2021-May-18 at 19:25

            I have a problem with implementing Ansible nested reference YAML variable file.

            Example of user dictionary file variable:

            1. User dictionary file variable, dev_infra_bastion_0_example_com is node FQDN name

              ...

            ANSWER

            Answered 2021-May-18 at 19:25

            There is two to three things wrong in your playbook.

            1. Do not use a debug and register if you want to register a variable, use the appropriate set_fact module

            Source https://stackoverflow.com/questions/67581655

            QUESTION

            How to define aws_cloudwatch_metric_alarm with multiple actions with terraform?
            Asked 2021-May-05 at 21:50

            I used the AWS Console to set up a Cloud Watch alarm that will send my team a slack notification and reboot the affected EC2 instance, when the EC2 instance fails a StatusCheck fails.

            Here's what the actions look like in the AWS console:

            Now I want to write a terraform module that will set this up for me. Here is what I have so far:

            cloudwatch_metric_alarm/main.tf

            ...

            ANSWER

            Answered 2021-May-05 at 20:44

            First, your var.alarm_actions is already a list, so adding brackets around it like [var.alarm_actions] is going to create a list of lists, which is going to cause errors. You just need to pass it directly to the resource like:

            Source https://stackoverflow.com/questions/67408318

            QUESTION

            Downside of using public subnet with strict whitelisting vs using private subnet for AWS cloud resources
            Asked 2021-Apr-21 at 22:47

            AWS recommends using private subnets for private resources.

            Use private subnets for your instances if they should not be accessed directly from the internet. Use a bastion host or NAT gateway for internet access from an instance in a private subnet.

            However, I want to understand the rationale on how is this better on putting the resource, lets say an EC2 instance on a public subnet. Then add some very strict security group to prevent public access. How is this the less secure approach? Or is it technically the same outcome security wise?

            ...

            ANSWER

            Answered 2021-Apr-21 at 22:47

            I've never heard of a security group failing, so if you properly configure your security group with a restricted list of IP addresses/ports, you should be secure.

            BUT

            In a typical cloud-deployed application, you do not have or want strictly-controlled access. Instead, the typical cloud-deployed application is a web-app that exposes port 80 to the world.

            And once you expose any port to the world, your security is entirely dependent on what is listening to that port. Do you have a vulnerability in your web-server? You've now given your attacker the ability to access resources inside your network. If your server has AWS access keys, then the attacker has them as well.

            The goal of putting your servers in a private subnet, with a load balancer in front of them, is to reduce your attack surface. It's presumably less likely that attackers will be able to find an exploit in an ALB (versus Apache, nginx, or whatever you're using), and presumably more likely that AWS will be able to mitigate any such exploit faster than you can (because they don't need to wait for patches to become available from an external maintainer).

            Of course, the code you wrote could have an exploit that's triggered from a standard HTTP(S) request. However, even in this case, you can reduce blast radius by controlling what your application can access. An instance with a public IP can access anything on the Internet unless you strictly control the egress rules in its security group. In a private subnet, it can only access stuff within the VPC.

            So, ultimately, it's a matter of simplicity: yes, you can craft a secure environment where every host is on the Internet. That was, in fact, the way that AWS worked prior to the introduction of VPCs. But it's easier to rely on the VPC to provide a base level of security (just like, in non-cloud deployments, you rely on the corporate firewall to provide a base level of security).

            Source https://stackoverflow.com/questions/67203161

            QUESTION

            How to connect KVM guest vm from mac hosts by ssh?
            Asked 2021-Apr-18 at 16:11

            I want to use KVM on Macbook. So what I did to start the kvm is:

            ...

            ANSWER

            Answered 2021-Apr-18 at 16:11

            The default QEMU networking type, which is what you're using, is "user-mode" networking. The IP address the guest VM sees in this setup is not visible outside the VM (it's a little bit like the VM being behind a NAT router). So while the guest can connect outwards, you cannot connect in to the guest unless you configure port forwarding on your QEMU command line. (The QEMU wiki page on networking includes an example of the syntax for this for an SSH port.)

            If you need the guest to have an IP address that is publicly visible to the rest of the world (including to the host machine) you need to use a different network backend, like "tap"; that's a lot more complicated to set up, though.

            Source https://stackoverflow.com/questions/67135075

            QUESTION

            Change Public GKE to Private GKE cluster using terraform
            Asked 2021-Apr-10 at 18:13

            How to change the existing GKE cluster to GKE private cluster? Will I be able to connect to the Kubectl API from internet based on firewall rules or should I have a bastion host? I don't want to implement Cloud Nat or nat gateway. I have a squid proxy VM that can handle internet access for pods. I just need to be able to connect to Kubectl to apply or modify anything.

            I'm unsure how to modify the existing module I wrote to make the nodes private and I'm not sure if the cluster will get deleted if I try and apply the new changes related to private gke cluster.

            ...

            ANSWER

            Answered 2021-Jan-27 at 12:09

            Answering the part of the question:

            How to change the existing GKE cluster to GKE private cluster?

            GKE setting: Private cluster is immutable. This setting can only be set during the GKE cluster provisioning.

            To create your cluster as a private one you can either:

            • Create a new GKE private cluster.
            • Duplicate existing cluster and set it to private:
              • This setting is available in GCP Cloud Console -> Kubernetes Engine -> CLUSTER-NAME -> Duplicate
              • This setting will clone the configuration of your infrastructure of your previous cluster but not the workload (Pods, Deployments, etc.)

            Will I be able to connect to the Kubectl API from internet based on firewall rules or should I have a bastion host?

            Yes, you could but it will heavily depend on the configuration that you've chosen during the GKE cluster creation process.

            As for ability to connect to your GKE private cluster, there is a dedicated documentation about it:

            As for how you can create a private cluster with Terraform, there is the dedicated site with configuration options specific to GKE. There are also parameters responsible for provisioning a private cluster:

            As for a basic example of creating a private GKE cluster with Terraform:

            • main.tf

            Source https://stackoverflow.com/questions/65916344

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install bastion

            Here's a demo of what a user experiences when setting up Google Authenticator for the first time. When using Duo as the MFA provider, this becomes even more magical because Duo supports automatic Push notifications to your mobile device. Just approve the request on your mobile phone (e.g. with a thumb press on iOS) when prompted.
            Here's how you can quickly demo the bastion. We assume you have ~/.ssh/authorized_keys properly configured and your SSH key (e.g. ~/.ssh/id_rsa) added to your SSH agent.

            Support

            Work directly with our team of DevOps experts via email, slack, and video conferencing. We provide commercial support for all of our Open Source projects. As a Dedicated Support customer, you have access to our team of subject matter experts at a fraction of the cost of a full-time engineer.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/cloudposse/bastion.git

          • CLI

            gh repo clone cloudposse/bastion

          • sshUrl

            git@github.com:cloudposse/bastion.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link