├── .dockerignore ├── .gitignore ├── CONFIGURE.md ├── Dockerfile ├── K8s ├── K8sLocal.sh ├── breakglass-configmap.yaml.example └── breakglass.yaml ├── LICENSE ├── README.md ├── assets ├── UI.png ├── UI2.png ├── arch.png ├── bot.png ├── breakglassCLI.png └── newrole.png ├── modules ├── breakglass-api │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── auth.ts │ │ ├── getConf.ts │ │ ├── index.ts │ │ ├── notify.ts │ │ ├── permissions.ts │ │ ├── roleReq.ts │ │ └── routes.ts │ └── yarn.lock ├── breakglass-cli │ ├── index.ts │ ├── package.json │ └── yarn.lock ├── breakglass-core │ ├── index.ts │ ├── package-lock.json │ ├── package.json │ └── yarn.lock └── breakglass-ui │ ├── package.json │ ├── src │ ├── components │ │ ├── App.tsx │ │ ├── Authorize.tsx │ │ ├── Done.tsx │ │ ├── Elevator.tsx │ │ └── Navbar.tsx │ ├── index.html │ └── main.js │ └── yarn.lock └── package.json /.dockerignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | **/.cache 3 | **/dist -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .cache 4 | key.json 5 | .vscode 6 | .secrets 7 | secrets.json 8 | conf.yaml 9 | breakglass-configmap.yaml -------------------------------------------------------------------------------- /CONFIGURE.md: -------------------------------------------------------------------------------- 1 | # How to configure breakglass 2 | 3 | The config for Breakglass lives in a Kubernetes configmap in the file `K8s/breakglass-configmap.yaml` file. Take a look at `K8s/breakglass-configmap.yaml.example` for an example configuration. Al the breakglass settings are in `data > config` 4 | 5 | ## OAuth Key 6 | 7 | Breakglass needs google OAuth to be configured to work, so be sure to include 8 | 9 | ```yaml 10 | OAuthClientId: 1234567890-XYZWVUTSRQP... 11 | ``` 12 | 13 | In `data > config > OAuthClientID: 123...` 14 | 15 | ## Global Settings 16 | 17 | Modify the config for all GCP projects under the global tag 18 | 19 | ```yml 20 | global: 21 | whitelist: 22 | - ... 23 | permissions: 24 | - ... 25 | notify: 26 | - ... 27 | ``` 28 | 29 | These settings will be applied by default to all projects. 30 | 31 | Available settings are 32 | 33 | - `whitelist` - A list of users (their emails) that are allowed to use Breakglass 34 | - `blacklist` - Users that are not allowed. This wont do much at the top level until user groups are implemented because every user is blacklisted by default. _Note_ including a user here will not allow them access even if they are whitelisted. 35 | - `permissions` - A list of roles a user can elevate to 36 | - `notify` - See **Configuring Notifications** below 37 | 38 | ## Project-Specific Settings 39 | 40 | To add specific settings to a project that will override the inherited global settings, add top level labels for the project 41 | 42 | ```yml 43 | sql-server-1337: #projectID 44 | blacklist: 45 | - ... 46 | permissions: 47 | - ... 48 | notify: 49 | - ... 50 | ``` 51 | 52 | The options here are the same as above 53 | 54 | - `whitelist` - Users on here will have access to Breakglass for this product even if they are blacklisted globally. 55 | - `blacklist` - This will prevent the user from elevating on this project even if they are whiteliested globally. 56 | - `permissions` - These are the _**additional**_ permissions that are able to be assumed for this project. All global ones will be available automatically 57 | - `notify` - These are _**additional**_ sources to notify in addition to the global ones 58 | 59 | ## Configuring Notifications 60 | 61 | Notification sources are configurable both globally and on a project level. 62 | 63 | ```yaml 64 | global: 65 | notify: 66 | emails: 67 | - Chief.Of.Security@yourcompany.com 68 | - Other.Guy@gmail.com 69 | chatrooms: 70 | - https://WEBHOOK-URL-FROM-GOOGLE-CHAT/asdf 71 | 72 | sql-server-1337: 73 | notify: 74 | emails: 75 | - Database.Admin@yourcompany.com 76 | chatrooms: 77 | - https://DATABASE-MANAGERS-CHATROOM-HOOK/qwerty 78 | ``` 79 | 80 | If you want to have email notifications you must get a [SendGrid API Key](https://signup.sendgrid.com/). You can get 100 emails a day for free. Include the key on the top level of the config as follows 81 | 82 | ```yaml 83 | SendGridKey: SG.XYZABC... 84 | ``` 85 | 86 | `chatrooms` is a list of webhooks that point at specific Google Chat Spaces. Read about webhooks [here](https://developers.google.com/hangouts/chat/how-tos/webhooks). 87 | 88 | The recipients of all notifications will be a concatination of the global and project level lists. 89 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:10 2 | 3 | # Downloading gcloud package 4 | RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz 5 | 6 | # Installing the package 7 | RUN mkdir -p /usr/local/gcloud \ 8 | && tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz \ 9 | && /usr/local/gcloud/google-cloud-sdk/install.sh 10 | 11 | # Adding the package path to local 12 | ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin 13 | # Create app directory 14 | WORKDIR /usr/src/app 15 | 16 | COPY . . 17 | 18 | # Build UI 19 | WORKDIR /usr/src/app/modules/breakglass-ui 20 | 21 | 22 | RUN npm install 23 | RUN npm run build 24 | 25 | WORKDIR /usr/src/app 26 | 27 | WORKDIR /usr/src/app/modules/breakglass-api 28 | 29 | RUN npm install 30 | RUN npm run build 31 | 32 | EXPOSE 8080 33 | 34 | CMD [ "node", "dist" ] -------------------------------------------------------------------------------- /K8s/K8sLocal.sh: -------------------------------------------------------------------------------- 1 | eval $(minikube docker-env) 2 | yarn docker -------------------------------------------------------------------------------- /K8s/breakglass-configmap.yaml.example: -------------------------------------------------------------------------------- 1 | kind: ConfigMap 2 | apiVersion: v1 3 | metadata: 4 | name: breakglass-configmap 5 | data: 6 | config: |- 7 | global: 8 | whitelist: 9 | - jason@jasonstillerman.com 10 | - mary@jasonstillerman.com 11 | 12 | permissions: 13 | - roles/iam.securityReviewer 14 | - roles/iam.securityAdmin 15 | 16 | notify: 17 | chatrooms: 18 | - https://chat.googleapis.com/v1/secret 19 | - https://chat.googleapis.com/v1/other 20 | emails: 21 | - jason.t.stillerman@gmail.com 22 | - js.skate.board@gmail.com 23 | 24 | mongodb-277417: 25 | whitelist: 26 | - bob@jasonstillerman.com 27 | 28 | blacklist: 29 | - jason@jasonstillerman.com 30 | 31 | permissions: 32 | - roles/iam.mongodbSpecific 33 | 34 | notify: 35 | chatrooms: 36 | - https://specific.chatroom.for.this.proj/asdf 37 | emails: 38 | - jtstille@uvm.edu 39 | 40 | SendGridKey: SG.ABCXYZ 41 | OAuthClientId: XXXXXXXXX.apps.googleusercontent.com 42 | ServiceAccountKey: { 43 | "type": "service_account", 44 | ... Rest of JSON copied from key.json 45 | } 46 | -------------------------------------------------------------------------------- /K8s/breakglass.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: breakglass 5 | spec: 6 | replicas: 1 7 | selector: 8 | matchLabels: 9 | app: breakglass 10 | template: 11 | metadata: 12 | labels: 13 | app: breakglass 14 | spec: 15 | containers: 16 | - name: breakglass 17 | image: jstillerman/breakglass:v6 18 | ports: 19 | - containerPort: 8080 20 | imagePullPolicy: Never 21 | envFrom: 22 | - configMapRef: 23 | name: breakglass-configmap 24 | --- 25 | apiVersion: v1 26 | kind: Service 27 | metadata: 28 | name: brgl-service 29 | spec: 30 | selector: 31 | app: breakglass 32 | ports: 33 | - port: 8080 34 | targetPort: 8080 35 | type: LoadBalancer 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2020 Jason Stillerman 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BreakGlass 2 | 3 | ### The [Highly Configurable](./CONFIGURE.md) Temporary GCP Privilege Escalation Tool 4 | 5 | ## What is BreakGlass? 6 | 7 | BreakGlass is a tool that allows developers to temporarily escalate their own GCP permissions at any time. This is like the sudo command for GCP permissions. Developers will be able to fix things at 3 AM without waking up the teams RP. 8 | 9 | ![UI](./assets/UI.png) 10 | ![UI2](./assets/UI2.png) 11 | ![Bot](./assets/bot.png) 12 | 13 | ## How it works 14 | 15 | 1. Sign into the app with your GCP credentials 16 | 2. Select a project 17 | 3. Select the permissions you need 18 | 4. Select a timeframe 19 | 5. Provide your reasoning for breaking the glass 20 | 6. Your permissions will be provided and the event will be logged 21 | 22 | # Getting Started 23 | 24 | 1. `$ git clone https://github.com/Stillerman/BreakGlass` 25 | 2. Create a new GCP project that will house the BreakGlass server. 26 | `gcloud projects create breakglass-{UniqueID} --name="BreakGlass"` 27 | 28 | Make sure unique ID is a company-specific identifier because the projectID must be unique across all projects on google cloud. 29 | 30 | Set that project to default with 31 | `gcloud config set project breakglass-{UniqueId}` 32 | 33 | 3. Create a service account 34 | 35 | ```shell 36 | gcloud iam service-accounts create sa-breakglass \ 37 | --description="BreakGlass service account" \ 38 | --display-name="sa-breakglass-disp" 39 | --project=breakglass-{UniqueID from above} 40 | ``` 41 | 42 | You will now be able to see the account with 43 | 44 | ``` 45 | gcloud iam service-accounts list 46 | ``` 47 | 48 | It will be something like `sa-breakglass@breakglass-{uniqueID}.iam.gserviceaccount.com` 49 | Download the `key.json` file with the following command (be sure you are in the root of the directory you cloned) 50 | 51 | ``` 52 | gcloud iam service-accounts keys create ./key.json \ 53 | --iam-account {The service account you created above} 54 | ``` 55 | 56 | Sign in by running the following 57 | 58 | ``` 59 | gcloud auth activate-service-account {service account} --key-file=key.json 60 | ``` 61 | 62 | 4. Grant Permissions 63 | 64 | Enable the Cloud Resource Manager API [Here](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com) 65 | **Note** be sure that this is for the project Breakglass! 66 | 67 | Next, grant sa-breakglass folder admin in all of the folders that you would like users to have the change to escalate in. Breakglass will only be able to see and update projects where it is the folder admin. 68 | 69 | After permissions are configured, run 70 | 71 | ``` 72 | gcloud projects list 73 | ``` 74 | 75 | and make sure you can see the projects you want breakglass to have access to. **Note** It might take 3-5 minutes for the permissions to update and the projects to be visible. 76 | 77 | 5. Add OAuth to breakglass project 78 | 79 | Go to the cloud console, select the breakglass project and then navigate to APIs & Services -> Credentials. Click "Create Credentials" -> Oauth Client ID -> Configure Consent Screen -> Internal then provide a display name (probably breakglass) -> Save 80 | 81 | Now go back to credentials -> Create Credentials -> OAuth Client Id -> Application type: Web Application 82 | 83 | Here, you name the key (name doesn't matter) and you also add "Authorized JavaScript Origins". Add just "http://localhost:8080" for now, we will come back to this later. 84 | 85 | Click create and copy the client ID for later. You won't be needed the secret. 86 | 87 | 6. Configure Breakglass 88 | 89 | Copy `K8s/breakglass-configmap.yaml.example` to `K8s/breakglass-configmap.yaml` and configure it to your needs. Read about possible configurations [here](./CONFIGURE.md). 90 | 91 | **Note** you will need the OAuth Client Id from the previous step. 92 | 93 | 7. Build the project 94 | 95 | Build the docker image in the minikube context with 96 | 97 | ``` 98 | yarn k8s 99 | ``` 100 | 101 | Configure Kubernetes Project with 102 | 103 | ``` 104 | minkube start 105 | kubectl apply -f K8s 106 | ``` 107 | 108 | Now the project will be running, but you have not whitelisted the port on the OAuth, so it will not work as is. Ensure everything is working properly by forwarding the port to the pod 109 | 110 | ``` 111 | kubectl port-forward {Naem od pod that was created} 8080:8080 112 | ``` 113 | 114 | Now navigate to `http://localhost:8080` 115 | 116 | 8. Done. 117 | -------------------------------------------------------------------------------- /assets/UI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stillerman/BreakGlass/1ce701c95192840035d4974cf39586fe88018f26/assets/UI.png -------------------------------------------------------------------------------- /assets/UI2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stillerman/BreakGlass/1ce701c95192840035d4974cf39586fe88018f26/assets/UI2.png -------------------------------------------------------------------------------- /assets/arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stillerman/BreakGlass/1ce701c95192840035d4974cf39586fe88018f26/assets/arch.png -------------------------------------------------------------------------------- /assets/bot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stillerman/BreakGlass/1ce701c95192840035d4974cf39586fe88018f26/assets/bot.png -------------------------------------------------------------------------------- /assets/breakglassCLI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stillerman/BreakGlass/1ce701c95192840035d4974cf39586fe88018f26/assets/breakglassCLI.png -------------------------------------------------------------------------------- /assets/newrole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stillerman/BreakGlass/1ce701c95192840035d4974cf39586fe88018f26/assets/newrole.png -------------------------------------------------------------------------------- /modules/breakglass-api/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "breakglass-api", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@types/body-parser": { 8 | "version": "1.19.0", 9 | "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz", 10 | "integrity": "sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ==", 11 | "dev": true, 12 | "requires": { 13 | "@types/connect": "*", 14 | "@types/node": "*" 15 | } 16 | }, 17 | "@types/connect": { 18 | "version": "3.4.33", 19 | "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.33.tgz", 20 | "integrity": "sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==", 21 | "dev": true, 22 | "requires": { 23 | "@types/node": "*" 24 | } 25 | }, 26 | "@types/cors": { 27 | "version": "2.8.6", 28 | "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.6.tgz", 29 | "integrity": "sha512-invOmosX0DqbpA+cE2yoHGUlF/blyf7nB0OGYBBiH27crcVm5NmFaZkLP4Ta1hGaesckCi5lVLlydNJCxkTOSg==", 30 | "dev": true, 31 | "requires": { 32 | "@types/express": "*" 33 | } 34 | }, 35 | "@types/express": { 36 | "version": "4.17.6", 37 | "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.6.tgz", 38 | "integrity": "sha512-n/mr9tZI83kd4azlPG5y997C/M4DNABK9yErhFM6hKdym4kkmd9j0vtsJyjFIwfRBxtrxZtAfGZCNRIBMFLK5w==", 39 | "dev": true, 40 | "requires": { 41 | "@types/body-parser": "*", 42 | "@types/express-serve-static-core": "*", 43 | "@types/qs": "*", 44 | "@types/serve-static": "*" 45 | } 46 | }, 47 | "@types/express-serve-static-core": { 48 | "version": "4.17.7", 49 | "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.7.tgz", 50 | "integrity": "sha512-EMgTj/DF9qpgLXyc+Btimg+XoH7A2liE8uKul8qSmMTHCeNYzydDKFdsJskDvw42UsesCnhO63dO0Grbj8J4Dw==", 51 | "dev": true, 52 | "requires": { 53 | "@types/node": "*", 54 | "@types/qs": "*", 55 | "@types/range-parser": "*" 56 | } 57 | }, 58 | "@types/mime": { 59 | "version": "2.0.2", 60 | "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.2.tgz", 61 | "integrity": "sha512-4kPlzbljFcsttWEq6aBW0OZe6BDajAmyvr2xknBG92tejQnvdGtT9+kXSZ580DqpxY9qG2xeQVF9Dq0ymUTo5Q==", 62 | "dev": true 63 | }, 64 | "@types/node": { 65 | "version": "14.0.1", 66 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.1.tgz", 67 | "integrity": "sha512-FAYBGwC+W6F9+huFIDtn43cpy7+SzG+atzRiTfdp3inUKL2hXnd4rG8hylJLIh4+hqrQy1P17kvJByE/z825hA==" 68 | }, 69 | "@types/qs": { 70 | "version": "6.9.3", 71 | "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz", 72 | "integrity": "sha512-7s9EQWupR1fTc2pSMtXRQ9w9gLOcrJn+h7HOXw4evxyvVqMi4f+q7d2tnFe3ng3SNHjtK+0EzGMGFUQX4/AQRA==", 73 | "dev": true 74 | }, 75 | "@types/range-parser": { 76 | "version": "1.2.3", 77 | "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz", 78 | "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==", 79 | "dev": true 80 | }, 81 | "@types/serve-static": { 82 | "version": "1.13.4", 83 | "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.4.tgz", 84 | "integrity": "sha512-jTDt0o/YbpNwZbQmE/+2e+lfjJEJJR0I3OFaKQKPWkASkCoW3i6fsUnqudSMcNAfbtmADGu8f4MV4q+GqULmug==", 85 | "dev": true, 86 | "requires": { 87 | "@types/express-serve-static-core": "*", 88 | "@types/mime": "*" 89 | } 90 | }, 91 | "accepts": { 92 | "version": "1.3.7", 93 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 94 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 95 | "requires": { 96 | "mime-types": "~2.1.24", 97 | "negotiator": "0.6.2" 98 | } 99 | }, 100 | "array-flatten": { 101 | "version": "1.1.1", 102 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 103 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 104 | }, 105 | "body-parser": { 106 | "version": "1.19.0", 107 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 108 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 109 | "requires": { 110 | "bytes": "3.1.0", 111 | "content-type": "~1.0.4", 112 | "debug": "2.6.9", 113 | "depd": "~1.1.2", 114 | "http-errors": "1.7.2", 115 | "iconv-lite": "0.4.24", 116 | "on-finished": "~2.3.0", 117 | "qs": "6.7.0", 118 | "raw-body": "2.4.0", 119 | "type-is": "~1.6.17" 120 | } 121 | }, 122 | "bytes": { 123 | "version": "3.1.0", 124 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 125 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 126 | }, 127 | "content-disposition": { 128 | "version": "0.5.3", 129 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", 130 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 131 | "requires": { 132 | "safe-buffer": "5.1.2" 133 | } 134 | }, 135 | "content-type": { 136 | "version": "1.0.4", 137 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 138 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 139 | }, 140 | "cookie": { 141 | "version": "0.4.0", 142 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 143 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 144 | }, 145 | "cookie-signature": { 146 | "version": "1.0.6", 147 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 148 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 149 | }, 150 | "cors": { 151 | "version": "2.8.5", 152 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 153 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 154 | "requires": { 155 | "object-assign": "^4", 156 | "vary": "^1" 157 | } 158 | }, 159 | "debug": { 160 | "version": "2.6.9", 161 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 162 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 163 | "requires": { 164 | "ms": "2.0.0" 165 | } 166 | }, 167 | "depd": { 168 | "version": "1.1.2", 169 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 170 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 171 | }, 172 | "destroy": { 173 | "version": "1.0.4", 174 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 175 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 176 | }, 177 | "ee-first": { 178 | "version": "1.1.1", 179 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 180 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 181 | }, 182 | "encodeurl": { 183 | "version": "1.0.2", 184 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 185 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 186 | }, 187 | "escape-html": { 188 | "version": "1.0.3", 189 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 190 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 191 | }, 192 | "etag": { 193 | "version": "1.8.1", 194 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 195 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 196 | }, 197 | "express": { 198 | "version": "4.17.1", 199 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", 200 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 201 | "requires": { 202 | "accepts": "~1.3.7", 203 | "array-flatten": "1.1.1", 204 | "body-parser": "1.19.0", 205 | "content-disposition": "0.5.3", 206 | "content-type": "~1.0.4", 207 | "cookie": "0.4.0", 208 | "cookie-signature": "1.0.6", 209 | "debug": "2.6.9", 210 | "depd": "~1.1.2", 211 | "encodeurl": "~1.0.2", 212 | "escape-html": "~1.0.3", 213 | "etag": "~1.8.1", 214 | "finalhandler": "~1.1.2", 215 | "fresh": "0.5.2", 216 | "merge-descriptors": "1.0.1", 217 | "methods": "~1.1.2", 218 | "on-finished": "~2.3.0", 219 | "parseurl": "~1.3.3", 220 | "path-to-regexp": "0.1.7", 221 | "proxy-addr": "~2.0.5", 222 | "qs": "6.7.0", 223 | "range-parser": "~1.2.1", 224 | "safe-buffer": "5.1.2", 225 | "send": "0.17.1", 226 | "serve-static": "1.14.1", 227 | "setprototypeof": "1.1.1", 228 | "statuses": "~1.5.0", 229 | "type-is": "~1.6.18", 230 | "utils-merge": "1.0.1", 231 | "vary": "~1.1.2" 232 | } 233 | }, 234 | "finalhandler": { 235 | "version": "1.1.2", 236 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 237 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 238 | "requires": { 239 | "debug": "2.6.9", 240 | "encodeurl": "~1.0.2", 241 | "escape-html": "~1.0.3", 242 | "on-finished": "~2.3.0", 243 | "parseurl": "~1.3.3", 244 | "statuses": "~1.5.0", 245 | "unpipe": "~1.0.0" 246 | } 247 | }, 248 | "forwarded": { 249 | "version": "0.1.2", 250 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 251 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 252 | }, 253 | "fresh": { 254 | "version": "0.5.2", 255 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 256 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 257 | }, 258 | "http-errors": { 259 | "version": "1.7.2", 260 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", 261 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 262 | "requires": { 263 | "depd": "~1.1.2", 264 | "inherits": "2.0.3", 265 | "setprototypeof": "1.1.1", 266 | "statuses": ">= 1.5.0 < 2", 267 | "toidentifier": "1.0.0" 268 | } 269 | }, 270 | "iconv-lite": { 271 | "version": "0.4.24", 272 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 273 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 274 | "requires": { 275 | "safer-buffer": ">= 2.1.2 < 3" 276 | } 277 | }, 278 | "inherits": { 279 | "version": "2.0.3", 280 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 281 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 282 | }, 283 | "ipaddr.js": { 284 | "version": "1.9.1", 285 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 286 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 287 | }, 288 | "media-typer": { 289 | "version": "0.3.0", 290 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 291 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 292 | }, 293 | "merge-descriptors": { 294 | "version": "1.0.1", 295 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 296 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 297 | }, 298 | "methods": { 299 | "version": "1.1.2", 300 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 301 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 302 | }, 303 | "mime": { 304 | "version": "1.6.0", 305 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 306 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 307 | }, 308 | "mime-db": { 309 | "version": "1.44.0", 310 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", 311 | "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" 312 | }, 313 | "mime-types": { 314 | "version": "2.1.27", 315 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", 316 | "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", 317 | "requires": { 318 | "mime-db": "1.44.0" 319 | } 320 | }, 321 | "ms": { 322 | "version": "2.0.0", 323 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 324 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 325 | }, 326 | "negotiator": { 327 | "version": "0.6.2", 328 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 329 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 330 | }, 331 | "object-assign": { 332 | "version": "4.1.1", 333 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 334 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 335 | }, 336 | "on-finished": { 337 | "version": "2.3.0", 338 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 339 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 340 | "requires": { 341 | "ee-first": "1.1.1" 342 | } 343 | }, 344 | "parseurl": { 345 | "version": "1.3.3", 346 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 347 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 348 | }, 349 | "path-to-regexp": { 350 | "version": "0.1.7", 351 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 352 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 353 | }, 354 | "proxy-addr": { 355 | "version": "2.0.6", 356 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", 357 | "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", 358 | "requires": { 359 | "forwarded": "~0.1.2", 360 | "ipaddr.js": "1.9.1" 361 | } 362 | }, 363 | "qs": { 364 | "version": "6.7.0", 365 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 366 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 367 | }, 368 | "range-parser": { 369 | "version": "1.2.1", 370 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 371 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 372 | }, 373 | "raw-body": { 374 | "version": "2.4.0", 375 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", 376 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 377 | "requires": { 378 | "bytes": "3.1.0", 379 | "http-errors": "1.7.2", 380 | "iconv-lite": "0.4.24", 381 | "unpipe": "1.0.0" 382 | } 383 | }, 384 | "safe-buffer": { 385 | "version": "5.1.2", 386 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 387 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 388 | }, 389 | "safer-buffer": { 390 | "version": "2.1.2", 391 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 392 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 393 | }, 394 | "send": { 395 | "version": "0.17.1", 396 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", 397 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 398 | "requires": { 399 | "debug": "2.6.9", 400 | "depd": "~1.1.2", 401 | "destroy": "~1.0.4", 402 | "encodeurl": "~1.0.2", 403 | "escape-html": "~1.0.3", 404 | "etag": "~1.8.1", 405 | "fresh": "0.5.2", 406 | "http-errors": "~1.7.2", 407 | "mime": "1.6.0", 408 | "ms": "2.1.1", 409 | "on-finished": "~2.3.0", 410 | "range-parser": "~1.2.1", 411 | "statuses": "~1.5.0" 412 | }, 413 | "dependencies": { 414 | "ms": { 415 | "version": "2.1.1", 416 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 417 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 418 | } 419 | } 420 | }, 421 | "serve-static": { 422 | "version": "1.14.1", 423 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", 424 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 425 | "requires": { 426 | "encodeurl": "~1.0.2", 427 | "escape-html": "~1.0.3", 428 | "parseurl": "~1.3.3", 429 | "send": "0.17.1" 430 | } 431 | }, 432 | "setprototypeof": { 433 | "version": "1.1.1", 434 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 435 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 436 | }, 437 | "statuses": { 438 | "version": "1.5.0", 439 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 440 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 441 | }, 442 | "toidentifier": { 443 | "version": "1.0.0", 444 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 445 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 446 | }, 447 | "type-is": { 448 | "version": "1.6.18", 449 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 450 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 451 | "requires": { 452 | "media-typer": "0.3.0", 453 | "mime-types": "~2.1.24" 454 | } 455 | }, 456 | "typescript": { 457 | "version": "3.9.2", 458 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.2.tgz", 459 | "integrity": "sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==", 460 | "dev": true 461 | }, 462 | "unpipe": { 463 | "version": "1.0.0", 464 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 465 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 466 | }, 467 | "utils-merge": { 468 | "version": "1.0.1", 469 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 470 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 471 | }, 472 | "vary": { 473 | "version": "1.1.2", 474 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 475 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 476 | } 477 | } 478 | } 479 | -------------------------------------------------------------------------------- /modules/breakglass-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "breakglass-api", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "scripts": { 7 | "watch": "./node_modules/.bin/parcel watch src/index.ts -t node", 8 | "build": "./node_modules/.bin/parcel build src/index.ts -t node" 9 | }, 10 | "dependencies": { 11 | "@sendgrid/mail": "^7.1.1", 12 | "@types/node": "^14.0.5", 13 | "body-parser": "^1.19.0", 14 | "cors": "^2.8.5", 15 | "express": "^4.17.1", 16 | "jsonwebtoken": "^8.5.1", 17 | "jwt-decode": "^2.2.0", 18 | "parcel": "^1.12.4", 19 | "yaml": "^1.10.0" 20 | }, 21 | "devDependencies": { 22 | "@types/cors": "^2.8.6", 23 | "@types/express": "^4.17.6", 24 | "typescript": "^3.9.2" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /modules/breakglass-api/src/auth.ts: -------------------------------------------------------------------------------- 1 | import jwtDecode from "jwt-decode"; 2 | 3 | export function validateUser(req, res, next) { 4 | let decoded = jwtDecode(req.headers["x-access-token"]); 5 | 6 | if (!decoded) { 7 | return res.status(401).send("You did not provide jwt"); 8 | } else if (decoded.exp * 1000 <= Date.now()) { 9 | return res.status(401).send("JWT is expired!"); 10 | } else { 11 | req.user = decoded; 12 | next(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/breakglass-api/src/getConf.ts: -------------------------------------------------------------------------------- 1 | import YAML from "yaml"; 2 | 3 | export function getConf() { 4 | //@ts-ignore 5 | const rawConf = process.env.config; 6 | if (rawConf) { 7 | return YAML.parse(rawConf); 8 | } else { 9 | throw new Error("NO CONFIG PROVIDED IN ENV"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/breakglass-api/src/index.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import cors from "cors"; 3 | import router from "./routes"; 4 | import { signIntoServiceAccount } from "../../breakglass-core"; 5 | import { getConf } from "./getConf"; 6 | 7 | const saKey = getConf().ServiceAccountKey; 8 | signIntoServiceAccount(saKey.client_email, JSON.stringify(saKey)); 9 | 10 | const app = express(); 11 | 12 | app.use(cors()); 13 | app.use(router); 14 | 15 | declare var __dirname; 16 | 17 | app.use(express.static(__dirname + "/../../breakglass-ui/dist")); 18 | 19 | console.log("Running app on 8080"); 20 | 21 | app.listen(8080); 22 | -------------------------------------------------------------------------------- /modules/breakglass-api/src/notify.ts: -------------------------------------------------------------------------------- 1 | import { RoleRequest, getDescription } from "./roleReq"; 2 | import sgMail from "@sendgrid/mail"; 3 | import axios from "axios"; 4 | 5 | //@ts-ignore 6 | import { getConf } from "./getConf"; 7 | 8 | export async function notify(roleReq: RoleRequest) { 9 | console.log("NOTIFYING THE AUTHORITIES!", getConf().SendGridKey); 10 | 11 | getConf()?.global?.notify?.chatrooms?.forEach((url) => { 12 | sendWebhook(url, roleReq); 13 | }); 14 | 15 | getConf()[roleReq.project.id]?.notify?.chatrooms?.forEach((url) => { 16 | sendWebhook(url, roleReq); 17 | }); 18 | 19 | if (getConf().SendGridKey) { 20 | sendEmails(roleReq); 21 | } 22 | } 23 | 24 | async function sendWebhook(url: string, roleReq: RoleRequest) { 25 | axios.post( 26 | url, 27 | { 28 | text: getDescription(roleReq), 29 | }, 30 | { 31 | headers: { 32 | "Content-Type": "application/json; charset=UTF-8", 33 | }, 34 | } 35 | ); 36 | } 37 | 38 | async function sendEmails(roleReq: RoleRequest) { 39 | let recipients = []; 40 | 41 | getConf()?.global?.notify?.emails?.forEach((email) => recipients.push(email)); 42 | 43 | getConf()[roleReq.project.id]?.notify?.emails?.forEach((email) => 44 | recipients.push(email) 45 | ); 46 | 47 | sgMail.setApiKey(getConf().SendGridKey); 48 | const msg = { 49 | from: "jason.t.stillerman@gmail.com", 50 | to: recipients, 51 | subject: roleReq.user + " Broke the Glass", 52 | text: getDescription(roleReq), 53 | }; 54 | try { 55 | await sgMail.sendMultiple(msg); 56 | } catch (e) { 57 | console.log("There was an error", e.message); 58 | } 59 | return; 60 | } 61 | -------------------------------------------------------------------------------- /modules/breakglass-api/src/permissions.ts: -------------------------------------------------------------------------------- 1 | import { getConf } from "./getConf"; 2 | 3 | function lowerCaseNoDots(user: string): string { 4 | return user.toLowerCase().replace(/\./g, ""); 5 | } 6 | 7 | export function canUserParticipate(user: string, project: string): boolean { 8 | let globallyBlacklisted = (getConf().global.blacklist || []) 9 | .map(lowerCaseNoDots) 10 | .includes(lowerCaseNoDots(user)); 11 | let globallyWhitelisted = (getConf().global.whitelist || []) 12 | .map(lowerCaseNoDots) 13 | .includes(lowerCaseNoDots(user)); 14 | 15 | let projectBlacklisted = false, 16 | projectWhitelisted = false; 17 | // If there is project-wide settings 18 | if (getConf()[project]) { 19 | projectBlacklisted = (getConf()[project].blacklist || []) 20 | .map(lowerCaseNoDots) 21 | .includes(lowerCaseNoDots(user)); 22 | projectWhitelisted = (getConf()[project].whitelist || []) 23 | .map(lowerCaseNoDots) 24 | .includes(lowerCaseNoDots(user)); 25 | } 26 | 27 | if (projectBlacklisted || projectWhitelisted) { 28 | return projectWhitelisted && !projectBlacklisted; 29 | } else { 30 | return globallyWhitelisted && !globallyBlacklisted; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /modules/breakglass-api/src/roleReq.ts: -------------------------------------------------------------------------------- 1 | import { toProject, Project } from "../../breakglass-core"; 2 | 3 | export type RoleRequest = { 4 | role: string; 5 | project: Project; 6 | user: string; 7 | hours: number; 8 | reasoning: string; 9 | }; 10 | 11 | export function reqBodytoRoleRequest(body: Object): RoleRequest { 12 | return { 13 | role: body["role"], 14 | user: body["user"], 15 | project: toProject(body["project"]), 16 | hours: body["hours"], 17 | reasoning: body["reasoning"], 18 | }; 19 | } 20 | 21 | export function getDescription(roleReq: RoleRequest): string { 22 | return `${roleReq.user} just broke the glass on project ${roleReq.project.id}. 23 | Role: ${roleReq.role} 24 | Hours: ${roleReq.hours} 25 | Reasoning: "${roleReq.reasoning}"`; 26 | } 27 | -------------------------------------------------------------------------------- /modules/breakglass-api/src/routes.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import bodyParser from "body-parser"; 3 | import { validateUser } from "./auth"; 4 | import { canUserParticipate } from "./permissions"; 5 | 6 | import { getConf } from "./getConf"; 7 | 8 | import { getProjects, grantRole, toProject } from "../../breakglass-core"; 9 | 10 | import { reqBodytoRoleRequest } from "./roleReq"; 11 | import { notify } from "./notify"; 12 | 13 | let router = express.Router(); 14 | 15 | router.get("/getProjects", validateUser, async (req, res) => { 16 | let projects = await getProjects(); 17 | return res.json( 18 | projects.filter((proj) => canUserParticipate(req["user"].email, proj.id)) 19 | ); 20 | }); 21 | 22 | router.get("/getRoles/:project", validateUser, async (req, res) => { 23 | console.log("Getting permissions for", req.params.project); 24 | let permissions = []; 25 | if (getConf()?.global?.permissions) { 26 | permissions = [...permissions, ...getConf().global.permissions]; 27 | } 28 | if ( 29 | getConf()[req.params.project] && 30 | getConf()[req.params.project].permissions 31 | ) { 32 | permissions = [ 33 | ...permissions, 34 | ...getConf()[req.params.project].permissions, 35 | ]; 36 | } 37 | res.json(permissions); 38 | }); 39 | 40 | router.post("/grantRole", validateUser, bodyParser.json(), async (req, res) => { 41 | const roleReq = reqBodytoRoleRequest(req.body); 42 | console.log("Granting Role!", roleReq.role); 43 | 44 | if (roleReq.user != req["user"].email) { 45 | return res 46 | .status(401) 47 | .send("You do not have permissions to elevate this user"); 48 | } 49 | 50 | await grantRole( 51 | roleReq.user, 52 | roleReq.project, 53 | roleReq.role, 54 | roleReq.hours, 55 | roleReq.reasoning 56 | ); 57 | 58 | console.log("Successful!"); 59 | 60 | await notify(roleReq); 61 | 62 | return res.status(200).json(req.body); 63 | }); 64 | 65 | router.get("/oauthClientId", (req, res) => { 66 | res.json(getConf().OAuthClientId); 67 | }); 68 | 69 | export default router; 70 | -------------------------------------------------------------------------------- /modules/breakglass-cli/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | toProject, 3 | getProjects, 4 | cleanEnv, 5 | grantRole, 6 | } from "../breakglass-core"; 7 | 8 | import inquirer from "inquirer"; 9 | 10 | async function escalate() { 11 | const allProjects = await getProjects(); 12 | const answers = await inquirer.prompt([ 13 | { 14 | message: "Which project would you like to escalate Bobs on privileges?", 15 | type: "list", 16 | choices: allProjects.map((p) => p.id), 17 | name: "pid", 18 | }, 19 | { 20 | message: "Select Role", 21 | type: "list", 22 | choices: ["roles/editor", "roles/iam.securityReviewer"], 23 | name: "role", 24 | }, 25 | { 26 | message: "How many hours would you like to have this role", 27 | type: "number", 28 | name: "hours", 29 | }, 30 | ]); 31 | 32 | let selectedProject = toProject(answers["pid"]); 33 | let selectedRole = answers["role"]; 34 | let hours = answers["hours"]; 35 | 36 | await grantRole( 37 | "Bob@jasonstillerman.com", 38 | selectedProject, 39 | selectedRole, 40 | hours 41 | ); 42 | 43 | console.log("Credentials updated!"); 44 | 45 | await cleanEnv(); 46 | } 47 | 48 | escalate(); 49 | -------------------------------------------------------------------------------- /modules/breakglass-cli/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "breakglass-cli", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "scripts": { 7 | "watch": "parcel watch index.ts -t node" 8 | }, 9 | "dependencies": { 10 | "inquirer": "^7.1.0" 11 | }, 12 | "devDependencies": { 13 | "typescript": "^3.9.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/breakglass-cli/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/color-name@^1.1.1": 6 | version "1.1.1" 7 | resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" 8 | integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== 9 | 10 | ansi-escapes@^4.2.1: 11 | version "4.3.1" 12 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" 13 | integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== 14 | dependencies: 15 | type-fest "^0.11.0" 16 | 17 | ansi-regex@^5.0.0: 18 | version "5.0.0" 19 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" 20 | integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== 21 | 22 | ansi-styles@^4.1.0: 23 | version "4.2.1" 24 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" 25 | integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== 26 | dependencies: 27 | "@types/color-name" "^1.1.1" 28 | color-convert "^2.0.1" 29 | 30 | chalk@^3.0.0: 31 | version "3.0.0" 32 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" 33 | integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== 34 | dependencies: 35 | ansi-styles "^4.1.0" 36 | supports-color "^7.1.0" 37 | 38 | chardet@^0.7.0: 39 | version "0.7.0" 40 | resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" 41 | integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== 42 | 43 | cli-cursor@^3.1.0: 44 | version "3.1.0" 45 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" 46 | integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== 47 | dependencies: 48 | restore-cursor "^3.1.0" 49 | 50 | cli-width@^2.0.0: 51 | version "2.2.1" 52 | resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" 53 | integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== 54 | 55 | color-convert@^2.0.1: 56 | version "2.0.1" 57 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" 58 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== 59 | dependencies: 60 | color-name "~1.1.4" 61 | 62 | color-name@~1.1.4: 63 | version "1.1.4" 64 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 65 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 66 | 67 | emoji-regex@^8.0.0: 68 | version "8.0.0" 69 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" 70 | integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== 71 | 72 | escape-string-regexp@^1.0.5: 73 | version "1.0.5" 74 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 75 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= 76 | 77 | external-editor@^3.0.3: 78 | version "3.1.0" 79 | resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" 80 | integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== 81 | dependencies: 82 | chardet "^0.7.0" 83 | iconv-lite "^0.4.24" 84 | tmp "^0.0.33" 85 | 86 | figures@^3.0.0: 87 | version "3.2.0" 88 | resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" 89 | integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== 90 | dependencies: 91 | escape-string-regexp "^1.0.5" 92 | 93 | has-flag@^4.0.0: 94 | version "4.0.0" 95 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" 96 | integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== 97 | 98 | iconv-lite@^0.4.24: 99 | version "0.4.24" 100 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" 101 | integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== 102 | dependencies: 103 | safer-buffer ">= 2.1.2 < 3" 104 | 105 | inquirer@^7.1.0: 106 | version "7.1.0" 107 | resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" 108 | integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== 109 | dependencies: 110 | ansi-escapes "^4.2.1" 111 | chalk "^3.0.0" 112 | cli-cursor "^3.1.0" 113 | cli-width "^2.0.0" 114 | external-editor "^3.0.3" 115 | figures "^3.0.0" 116 | lodash "^4.17.15" 117 | mute-stream "0.0.8" 118 | run-async "^2.4.0" 119 | rxjs "^6.5.3" 120 | string-width "^4.1.0" 121 | strip-ansi "^6.0.0" 122 | through "^2.3.6" 123 | 124 | is-fullwidth-code-point@^3.0.0: 125 | version "3.0.0" 126 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" 127 | integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== 128 | 129 | lodash@^4.17.15: 130 | version "4.17.15" 131 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" 132 | integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== 133 | 134 | mimic-fn@^2.1.0: 135 | version "2.1.0" 136 | resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" 137 | integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== 138 | 139 | mute-stream@0.0.8: 140 | version "0.0.8" 141 | resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" 142 | integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== 143 | 144 | onetime@^5.1.0: 145 | version "5.1.0" 146 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" 147 | integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== 148 | dependencies: 149 | mimic-fn "^2.1.0" 150 | 151 | os-tmpdir@~1.0.2: 152 | version "1.0.2" 153 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 154 | integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= 155 | 156 | restore-cursor@^3.1.0: 157 | version "3.1.0" 158 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" 159 | integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== 160 | dependencies: 161 | onetime "^5.1.0" 162 | signal-exit "^3.0.2" 163 | 164 | run-async@^2.4.0: 165 | version "2.4.1" 166 | resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" 167 | integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== 168 | 169 | rxjs@^6.5.3: 170 | version "6.5.5" 171 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" 172 | integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== 173 | dependencies: 174 | tslib "^1.9.0" 175 | 176 | "safer-buffer@>= 2.1.2 < 3": 177 | version "2.1.2" 178 | resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" 179 | integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== 180 | 181 | signal-exit@^3.0.2: 182 | version "3.0.3" 183 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" 184 | integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== 185 | 186 | string-width@^4.1.0: 187 | version "4.2.0" 188 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" 189 | integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== 190 | dependencies: 191 | emoji-regex "^8.0.0" 192 | is-fullwidth-code-point "^3.0.0" 193 | strip-ansi "^6.0.0" 194 | 195 | strip-ansi@^6.0.0: 196 | version "6.0.0" 197 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" 198 | integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== 199 | dependencies: 200 | ansi-regex "^5.0.0" 201 | 202 | supports-color@^7.1.0: 203 | version "7.1.0" 204 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" 205 | integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== 206 | dependencies: 207 | has-flag "^4.0.0" 208 | 209 | through@^2.3.6: 210 | version "2.3.8" 211 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 212 | integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= 213 | 214 | tmp@^0.0.33: 215 | version "0.0.33" 216 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" 217 | integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== 218 | dependencies: 219 | os-tmpdir "~1.0.2" 220 | 221 | tslib@^1.9.0: 222 | version "1.13.0" 223 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" 224 | integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== 225 | 226 | type-fest@^0.11.0: 227 | version "0.11.0" 228 | resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" 229 | integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== 230 | 231 | typescript@^3.9.2: 232 | version "3.9.2" 233 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.2.tgz#64e9c8e9be6ea583c54607677dd4680a1cf35db9" 234 | integrity sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw== 235 | -------------------------------------------------------------------------------- /modules/breakglass-core/index.ts: -------------------------------------------------------------------------------- 1 | //@ts-ignore 2 | import { exec } from "child_process"; 3 | //@ts-ignore 4 | import fs from "fs"; 5 | 6 | const FILENAME = "policy.json"; 7 | 8 | async function cmd(command: string): Promise { 9 | return new Promise((acc, rej) => { 10 | exec(command, (err, stdout, stderr) => { 11 | if (err) return rej(err); 12 | if (stderr) return rej(stderr); 13 | acc(stdout); 14 | }); 15 | }); 16 | } 17 | 18 | export type Project = { 19 | id: string; 20 | }; 21 | 22 | export type Policy = { 23 | content: Object; 24 | }; 25 | 26 | export function toProject(str: string): Project { 27 | return { 28 | id: str, 29 | }; 30 | } 31 | 32 | export function toPolicy(obj: Object): Policy { 33 | return { 34 | content: obj, 35 | }; 36 | } 37 | 38 | export async function getProjects(): Promise> { 39 | const projectsStr = await cmd("gcloud projects list"); 40 | const projectIds = projectsStr 41 | .split("\n") 42 | .splice(1) 43 | .filter((s) => s.length != 0) 44 | .map((line) => line.split(" ")[0]) 45 | .map(toProject); 46 | 47 | return projectIds; 48 | } 49 | 50 | export async function getPolicy(proj: Project): Promise { 51 | let currentIam = toPolicy( 52 | JSON.parse( 53 | await cmd(`gcloud projects get-iam-policy ${proj.id} --format=json`) 54 | ) 55 | ); 56 | 57 | return currentIam; 58 | } 59 | 60 | export async function updatePolicy(policy: Policy, proj: Project) { 61 | fs.writeFileSync(FILENAME, JSON.stringify(policy.content)); 62 | 63 | try { 64 | await cmd(`gcloud projects set-iam-policy ${proj.id} ${FILENAME}`); 65 | return true; 66 | } catch (e) { 67 | console.log("[WARN]", e); 68 | return false; 69 | } 70 | } 71 | 72 | export async function grantRole( 73 | user: string, 74 | proj: Project, 75 | role: string, 76 | hours: number, 77 | reasoning?: string 78 | ) { 79 | let currentPolicy = await getPolicy(proj); 80 | currentPolicy.content["bindings"].push( 81 | getTempBinding(user, role, hours, reasoning) 82 | ); 83 | await updatePolicy(currentPolicy, proj); 84 | } 85 | 86 | function getTempBinding( 87 | user: string, 88 | role: string, 89 | hours: number, 90 | reasoning?: string 91 | ) { 92 | let d = new Date(); 93 | addHours(d, hours); 94 | 95 | let dateStr = d.toISOString(); 96 | 97 | return { 98 | members: ["user:" + user], 99 | role: role, 100 | condition: { 101 | title: "Expires_In_" + hours.toString(), 102 | description: (reasoning + " - " || "") + `Expires in ${hours} hours`, 103 | expression: `request.time < timestamp('${dateStr}')`, 104 | }, 105 | }; 106 | } 107 | 108 | export async function signIntoServiceAccount(account: string, keyFile: string) { 109 | fs.writeFileSync("./key.json", keyFile); 110 | 111 | await cmd( 112 | `gcloud auth activate-service-account ${account} --key-file=key.json` 113 | ); 114 | 115 | console.log("SIGNED INTO SERVICE ACCOUNT"); 116 | } 117 | 118 | export async function cleanEnv() { 119 | await cmd("rm " + FILENAME); 120 | } 121 | 122 | function addHours(date: Date, hours: number) { 123 | date.setTime(date.getTime() + hours * 60 * 60 * 1000); 124 | } 125 | -------------------------------------------------------------------------------- /modules/breakglass-core/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "breakglass-core", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@types/node": { 8 | "version": "14.0.5", 9 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz", 10 | "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==", 11 | "dev": true 12 | }, 13 | "typescript": { 14 | "version": "3.9.2", 15 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.2.tgz", 16 | "integrity": "sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==", 17 | "dev": true 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/breakglass-core/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "breakglass-core", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "devDependencies": { 7 | "@types/node": "^14.0.5", 8 | "typescript": "^3.9.2" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/breakglass-core/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/node@^14.0.5": 6 | version "14.0.5" 7 | resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.5.tgz#3d03acd3b3414cf67faf999aed11682ed121f22b" 8 | integrity sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA== 9 | 10 | typescript@^3.9.2: 11 | version "3.9.3" 12 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.3.tgz#d3ac8883a97c26139e42df5e93eeece33d610b8a" 13 | integrity sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ== 14 | -------------------------------------------------------------------------------- /modules/breakglass-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "breakglass-ui", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "scripts": { 7 | "dev": "node_modules/.bin/parcel src/index.html", 8 | "watch": "node_modules/.bin/parcel watch src/index.html", 9 | "build": "node_modules/.bin/parcel build src/index.html" 10 | }, 11 | "dependencies": { 12 | "axios": "^0.19.2", 13 | "bulma": "^0.8.2", 14 | "jwt-decode": "^2.2.0", 15 | "parcel": "^1.12.4", 16 | "react": "^16.13.1", 17 | "react-dom": "^16.13.1", 18 | "react-google-login": "^5.1.20", 19 | "yaml": "^1.10.0" 20 | }, 21 | "devDependencies": { 22 | "typescript": "^3.9.2" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /modules/breakglass-ui/src/components/App.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import Navbar from "./Navbar"; 3 | import Elevator from "./Elevator"; 4 | import axios from "axios"; 5 | import Done from "./Done"; 6 | import Authorize from "./Authorize"; 7 | import { useState } from "react"; 8 | 9 | type AppState = "UnAuthed" | "Elevator" | "Loading" | "Error" | "Done"; 10 | 11 | const App = () => { 12 | const [appState, setAppState] = useState("UnAuthed"); 13 | const [error, setError] = useState("No Error!"); 14 | const [token, setToken] = useState(""); 15 | 16 | async function handleBreakGlass(params) { 17 | setAppState("Loading"); 18 | const resp = await axios.post("/grantRole", params, { 19 | headers: { 20 | "x-access-token": token, 21 | }, 22 | }); 23 | console.log("You broke the glass!", resp); 24 | setAppState("Done"); 25 | } 26 | 27 | function handleAuth(token: string) { 28 | setToken(token); 29 | setAppState("Elevator"); 30 | } 31 | 32 | function handleError(err: string) { 33 | setAppState("Error"); 34 | setError(err); 35 | } 36 | 37 | function getMainContent() { 38 | switch (appState) { 39 | case "UnAuthed": 40 | return ; 41 | case "Elevator": 42 | return ( 43 | 48 | ); 49 | case "Done": 50 | return ; 51 | case "Loading": 52 | return

Loading...

; 53 | case "Error": 54 | return

Error: {error}

; 55 | } 56 | } 57 | 58 | return ( 59 |
60 | setAppState("UnAuthed")} 64 | > 65 |
66 |
{getMainContent()}
67 |
68 |
69 | ); 70 | }; 71 | 72 | export default App; 73 | -------------------------------------------------------------------------------- /modules/breakglass-ui/src/components/Authorize.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { GoogleLogin } from "react-google-login"; 3 | import axios from "axios"; 4 | 5 | export default ({ onAuth }) => { 6 | const [clientId, setClientId] = React.useState(""); 7 | const [loading, setLoading] = React.useState(true); 8 | 9 | async function fetchClientId() { 10 | setLoading(true); 11 | const resp = await axios.get("/oauthClientId"); 12 | console.log(resp); 13 | setClientId(resp.data); 14 | setLoading(false); 15 | } 16 | 17 | React.useEffect(() => { 18 | fetchClientId(); 19 | }, []); 20 | return ( 21 |
22 |

Login with Google

23 | {loading ? ( 24 |

Loading

25 | ) : ( 26 | onAuth(results["tokenId"])} 30 | onFailure={console.log} 31 | cookiePolicy={"single_host_origin"} 32 | isSignedIn={true} 33 | > 34 | )} 35 |
36 | ); 37 | }; 38 | -------------------------------------------------------------------------------- /modules/breakglass-ui/src/components/Done.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | export default () => { 4 | return ( 5 |
6 |

Done!

7 |
8 | ); 9 | }; 10 | -------------------------------------------------------------------------------- /modules/breakglass-ui/src/components/Elevator.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { useState, useEffect } from "react"; 3 | import axios from "axios"; 4 | import jwtDecode from "jwt-decode"; 5 | 6 | export default ({ onError, onGlassBroken, token }) => { 7 | const [modalActive, setModalActive] = useState(false); 8 | 9 | const [user, setUser] = useState(""); 10 | 11 | const [projects, setProjects] = useState([]); 12 | const [loadingProjects, setLoadingProjects] = useState(true); 13 | const [project, setProject] = useState(""); 14 | 15 | const [roles, setRoles] = useState([]); 16 | const [loadingRoles, setLoadingRoles] = useState(false); 17 | const [role, setRole] = useState(""); 18 | 19 | const [reasoning, setReasoning] = useState(""); 20 | 21 | const [hours, setHours] = useState(2); 22 | 23 | function isEmailValid() { 24 | return /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(user); 25 | } 26 | 27 | async function fetchProjects() { 28 | setLoadingProjects(true); 29 | console.log("Fetching projects"); 30 | try { 31 | const response = await axios 32 | .get("/getProjects", { 33 | headers: { 34 | "x-access-token": token, 35 | }, 36 | }) 37 | .catch((err) => { 38 | throw new Error(err); 39 | }); 40 | 41 | const projs = response.data.map((p) => p.id); 42 | setProjects(projs); 43 | setLoadingProjects(false); 44 | } catch (err) { 45 | onError(err.message); 46 | } 47 | } 48 | 49 | async function fetchRoles() { 50 | if (project.length > 0) { 51 | setLoadingRoles(true); 52 | const response = await axios 53 | .get("/getRoles/" + project, { 54 | headers: { 55 | "x-access-token": token, 56 | }, 57 | }) 58 | .catch((err) => { 59 | throw new Error(err); 60 | }); 61 | setRoles(response.data); 62 | setLoadingRoles(false); 63 | } 64 | } 65 | 66 | function onSubmit() { 67 | setModalActive(true); 68 | } 69 | 70 | function onCancel() { 71 | setProject(""); 72 | setRole(""); 73 | setHours(1); 74 | setReasoning(""); 75 | } 76 | 77 | function onBreakGlass() { 78 | onGlassBroken({ 79 | user, 80 | project, 81 | role, 82 | hours, 83 | reasoning, 84 | }); 85 | onCancel(); 86 | } 87 | 88 | useEffect(() => { 89 | const decoded = jwtDecode(token); 90 | fetchProjects(); 91 | setRole(""); 92 | setUser(decoded.email); 93 | console.log(token); 94 | }, []); 95 | 96 | useEffect(() => { 97 | fetchRoles(); 98 | }, [project]); 99 | 100 | return ( 101 |
102 |
103 | 104 |
105 | setUser(e.target.value)} 112 | /> 113 | 114 | 115 | 116 | {!isEmailValid() && ( 117 | 118 | 119 | 120 | )} 121 |
122 | {!isEmailValid() && ( 123 |

This email is invalid

124 | )} 125 |
126 | 127 |
128 |
129 | 130 |
131 | 140 |
141 |
142 |
143 | 144 |
145 |
146 | 147 |
148 | 158 |
159 |
160 |
161 | 162 |
163 | 166 | 167 |
168 |
169 |
170 | setHours(parseInt(e.target.value))} 178 | /> 179 |
180 |
181 |
182 |
183 | 184 |
185 | 186 |
187 | 193 |
194 |
195 | 196 |
197 |
198 | 201 |
202 |
203 | 206 |
207 |
208 | 209 |
210 |
211 |
212 | 256 |
257 | 262 |
263 |
264 | ); 265 | }; 266 | -------------------------------------------------------------------------------- /modules/breakglass-ui/src/components/Navbar.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { GoogleLogout } from "react-google-login"; 3 | 4 | import axios from "axios"; 5 | 6 | export default ({ appState, token, logOut }) => { 7 | const [clientId, setClientId] = React.useState(""); 8 | const [loading, setLoading] = React.useState(true); 9 | 10 | async function fetchClientId() { 11 | setLoading(true); 12 | const resp = await axios.get("/oauthClientId"); 13 | console.log(resp); 14 | setClientId(resp.data); 15 | setLoading(false); 16 | } 17 | 18 | React.useEffect(() => { 19 | fetchClientId(); 20 | }, []); 21 | return ( 22 | 71 | ); 72 | }; 73 | -------------------------------------------------------------------------------- /modules/breakglass-ui/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | BreakGlass 13 | 14 | 15 |
16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /modules/breakglass-ui/src/main.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import Main from "./components/App"; 4 | 5 | let App = document.getElementById("app"); 6 | 7 | ReactDOM.render(
, App); 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "breakglass", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "docker": "docker build . -t jstillerman/breakglass:v6", 6 | "k8s": "sh K8s/K8sLocal.sh" 7 | } 8 | } --------------------------------------------------------------------------------