opal-security 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ const config_1 = require("../lib/config");
6
6
  const handler_1 = require("../handler");
7
7
  const moment = require("moment");
8
8
  const apollo_1 = require("../lib/apollo");
9
- const common_1 = require("../lib/common");
9
+ const util_1 = require("./util");
10
10
  const CreateSessionDocument = `
11
11
  mutation CreateSession($id: ResourceId!, $accessLevel: ResourceAccessLevelInput!, $sessionId: SessionId) {
12
12
  createSession(input: {resourceId: $id, accessLevel: $accessLevel, sessionId: $sessionId}) {
@@ -15,6 +15,7 @@ mutation CreateSession($id: ResourceId!, $accessLevel: ResourceAccessLevelInput!
15
15
  session {
16
16
  id
17
17
  accessLevelRemoteId
18
+ createdAt
18
19
  endTime
19
20
  metadata {
20
21
  METADATA_FRAGMENT
@@ -47,6 +48,7 @@ query ListSessions($id: ResourceId!) {
47
48
  sessions {
48
49
  id
49
50
  accessLevelRemoteId
51
+ createdAt
50
52
  endTime
51
53
  metadata {
52
54
  METADATA_FRAGMENT
@@ -56,7 +58,7 @@ query ListSessions($id: ResourceId!) {
56
58
  }
57
59
  }
58
60
  `;
59
- const getSession = async (command, resourceId, accessLevelRemoteId, sessionId, metadataFragment) => {
61
+ const getSession = async (command, resourceId, accessLevelRemoteId, sessionId, metadataFragment, minCreatedAt) => {
60
62
  const { resp, error } = await handler_1.runQuery({
61
63
  command: command,
62
64
  query: ListSessionsDocument.replace('METADATA_FRAGMENT', metadataFragment),
@@ -78,6 +80,10 @@ const getSession = async (command, resourceId, accessLevelRemoteId, sessionId, m
78
80
  if (session.accessLevelRemoteId !== accessLevelRemoteId) {
79
81
  continue;
80
82
  }
83
+ if (minCreatedAt && moment(session.createdAt).diff(minCreatedAt) < 0) {
84
+ // This lets us wait until we get a session that's newly created
85
+ continue;
86
+ }
81
87
  if (!selectedSession || moment(session.endTime).diff(selectedSession.endTime) > 0) {
82
88
  // Select the session with the latest end time
83
89
  selectedSession = session;
@@ -89,23 +95,28 @@ const getSession = async (command, resourceId, accessLevelRemoteId, sessionId, m
89
95
  return apollo_1.handleError(command, error, resp);
90
96
  }
91
97
  };
92
- const openBrowserAndPollForSession = async (command, message, resourceId, accessLevelRemoteId, sessionId, metadataFragment) => {
98
+ const openBrowserAndPollForSession = async (command, message, resourceId, accessLevelRemoteId, sessionId, metadataFragment, wantNewSession) => {
99
+ let minCreatedAt;
100
+ if (wantNewSession) {
101
+ // Ensure we poll for a new session rather than get an existing one.
102
+ minCreatedAt = moment();
103
+ }
93
104
  command.log(message);
94
105
  const configData = config_1.getOrCreateConfigData(command.config.configDir);
95
106
  const url = configData[config_1.urlKey];
96
107
  setTimeout(() => {
97
- open(url + `/resources/${resourceId}?showModal=true`);
108
+ open(url + `/resources/${resourceId}?showModal=true&refresh=true`);
98
109
  }, 2000); // Wait before opening the browser to give the user time to read the message
99
110
  let session;
100
111
  while (!session) {
101
112
  // eslint-disable-next-line no-await-in-loop
102
- await common_1.sleep(2000);
113
+ await util_1.sleep(2000);
103
114
  // eslint-disable-next-line no-await-in-loop
104
- session = await getSession(command, resourceId, accessLevelRemoteId, sessionId, metadataFragment);
115
+ session = await getSession(command, resourceId, accessLevelRemoteId, sessionId, metadataFragment, minCreatedAt);
105
116
  }
106
117
  return session;
107
118
  };
108
- const createSession = async (command, resourceId, accessLevel, sessionId, metadataFragment) => {
119
+ const createSession = async (command, resourceId, accessLevel, sessionId, metadataFragment, wantNewSession) => {
109
120
  const { resp, error } = await handler_1.runMutation({
110
121
  command: command,
111
122
  query: CreateSessionDocument.replace('METADATA_FRAGMENT', metadataFragment),
@@ -123,28 +134,28 @@ const createSession = async (command, resourceId, accessLevel, sessionId, metada
123
134
  return resp.data.createSession.session;
124
135
  }
125
136
  case 'MfaInvalidError': {
126
- command.log();
127
- return openBrowserAndPollForSession(command, '❗ MFA validation needed. Please connect via browser. Opening browser and awaiting validation...', resourceId, accessLevel.accessLevelRemoteId, sessionId, metadataFragment);
137
+ return openBrowserAndPollForSession(command, '❗ MFA validation needed. Please connect via browser. Opening browser and awaiting validation...', resourceId, accessLevel.accessLevelRemoteId, sessionId, metadataFragment, wantNewSession);
128
138
  }
129
139
  case 'OidcIDTokenNotFoundError': {
130
- command.log();
131
- return openBrowserAndPollForSession(command, '❗ OIDC authentication needed. Please connect via browser. Opening browser and awaiting authentication...', resourceId, accessLevel.accessLevelRemoteId, sessionId, metadataFragment);
140
+ return openBrowserAndPollForSession(command, '❗ OIDC authentication needed. Please connect via browser. Opening browser and awaiting authentication...', resourceId, accessLevel.accessLevelRemoteId, sessionId, metadataFragment, wantNewSession);
132
141
  }
133
142
  default:
134
143
  return apollo_1.handleError(command, error, resp);
135
144
  }
136
145
  };
137
- exports.getOrCreateSession = async (command, resourceId, accessLevel, sessionId, metadataFragment) => {
138
- // Use existing session if it exists
139
- const existingSession = await getSession(command, resourceId, accessLevel.accessLevelRemoteId, sessionId, metadataFragment);
140
- if (existingSession) {
141
- return existingSession;
146
+ exports.getOrCreateSession = async (command, resourceId, accessLevel, sessionId, metadataFragment, wantNewSession) => {
147
+ if (!wantNewSession) {
148
+ // Use existing session if it exists
149
+ const existingSession = await getSession(command, resourceId, accessLevel.accessLevelRemoteId, sessionId, metadataFragment);
150
+ if (existingSession) {
151
+ return existingSession;
152
+ }
142
153
  }
143
154
  if (sessionId) {
144
155
  return apollo_1.handleError(command, 'Session not found for given id: ' + sessionId);
145
156
  }
146
157
  // Create new session
147
- return createSession(command, resourceId, accessLevel, sessionId, metadataFragment);
158
+ return createSession(command, resourceId, accessLevel, sessionId, metadataFragment, wantNewSession);
148
159
  };
149
160
  exports.getSessionExpirationMessage = (session) => {
150
161
  const diff = moment(session.endTime).diff(moment(), 'minutes');
@@ -1 +1 @@
1
- {"version":"2.1.0","commands":{"curl-example":{"id":"curl-example","description":"Prints out an example cURL command containing the parameters the CLI uses to query the Opal server.","pluginName":"opal-security","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"login":{"id":"login","description":"Authenticates you with the Opal server.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal login"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"email":{"name":"email","type":"option","description":"Email address to login with."}},"args":[]},"logout":{"id":"logout","description":"Clears locally stored Opal server authentication credentials.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal logout"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"set-custom-header":{"id":"set-custom-header","description":"Sets a custom HTTP header to connect to the Opal server.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal set-custom-header --header 'cf-access-token: $TOKEN'"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"header":{"name":"header","type":"option"}},"args":[]},"set-token":{"id":"set-token","description":"Sets an API token to authenticate with the Opal server - alternative auth flow for headless environments.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal set-token"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"set-url":{"id":"set-url","description":"Sets the url of the Opal server. Defaults to https://app.opal.dev.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal set-url"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"allowSelfSignedCerts":{"name":"allowSelfSignedCerts","type":"boolean","allowNo":false},"custom":{"name":"custom","type":"option","hidden":true},"prod":{"name":"prod","type":"boolean","hidden":true,"allowNo":false},"demo":{"name":"demo","type":"boolean","hidden":true,"allowNo":false},"dev":{"name":"dev","type":"boolean","hidden":true,"allowNo":false},"devLocal":{"name":"devLocal","type":"boolean","hidden":true,"allowNo":false}},"args":[{"name":"url","description":"URL of the Opal server to use. If unspecified, defaults to https://app.opal.dev","required":false}]},"aws:identity":{"id":"aws:identity","description":"Gets the current caller identity for the \"opal\" AWS profile.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal aws:identity"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"iam-roles:start":{"id":"iam-roles:start","description":"Starts a session to assume an IAM role.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal iam-roles:start","opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398","opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --profileName \"custom-profile\""],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the Opal role resource."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."},"profileName":{"name":"profileName","type":"option","description":"Uses a custom AWS profile name for the IAM role. Default value is the role's name."}},"args":[]},"kube-roles:start":{"id":"kube-roles:start","description":"Starts a session to assume a Kubernetes cluster IAM role.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal kube-roles:start","opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398","opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId \"arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role\""],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the Opal role resource."},"accessLevelRemoteId":{"name":"accessLevelRemoteId","type":"option","description":"The remote ID of the access level with which to access the cluster."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."}},"args":[]},"postgres-instances:start":{"id":"postgres-instances:start","description":"Starts a session to query a Postgres database.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal postgres-instances:start","opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398","opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId \"fullaccess\""],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the Opal instance resource."},"accessLevelRemoteId":{"name":"accessLevelRemoteId","type":"option","description":"The remote ID of the access level with which to access the database."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."}},"args":[]},"resources:get":{"id":"resources:get","description":"Get resource info for a particular resource.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","required":true}},"args":[]},"ssh:copyFrom":{"id":"ssh:copyFrom","description":"Use SCP to copy files from a compute instance.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal ssh:copyFrom --src instance/dir --dest my/dir","opal ssh:copyFrom --src instance/dir --dest my/dir --id 51f7176b-0464-4a6f-8369-e951e187b398"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"src":{"name":"src","type":"option","description":"The path of the directory or file you would like to copy over SCP. Note we only support one file or directory at a time.","required":true},"dest":{"name":"dest","type":"option","description":"Pick which directory you want your files to be copied to.","required":false,"default":"."},"user":{"name":"user","type":"option","description":"Pick which user you want to run SCP over. Keep in mind not all users will have access to each other's home directory.","required":false,"default":"ssm-user"},"id":{"name":"id","type":"option","description":"The ID of the Opal instance resource."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."}},"args":[]},"ssh:copyTo":{"id":"ssh:copyTo","description":"Use SCP to copy files to a compute instance.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal ssh:copyTo --src my/dir --dest instance/dir","opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"src":{"name":"src","type":"option","description":"The path of the directory or file you would like to copy over SCP. Note we only support one file or directory at a time.","required":true},"dest":{"name":"dest","type":"option","description":"Pick which directory you want your files to be copied to.","required":false,"default":"."},"user":{"name":"user","type":"option","description":"Pick which user you want to run SCP over. Keep in mind not all users will have access to each other's home directory.","required":false,"default":"ssm-user"},"id":{"name":"id","type":"option","description":"The ID of the Opal instance resource."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."}},"args":[]},"ssh:start":{"id":"ssh:start","description":"Starts an SSH session to access a compute instance.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal ssh:start","opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the Opal instance resource."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."}},"args":[]}}}
1
+ {"version":"2.1.1","commands":{"curl-example":{"id":"curl-example","description":"Prints out an example cURL command containing the parameters the CLI uses to query the Opal server.","pluginName":"opal-security","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"login":{"id":"login","description":"Authenticates you with the Opal server.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal login"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"email":{"name":"email","type":"option","description":"Email address to login with."}},"args":[]},"logout":{"id":"logout","description":"Clears locally stored Opal server authentication credentials.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal logout"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"set-custom-header":{"id":"set-custom-header","description":"Sets a custom HTTP header to connect to the Opal server.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal set-custom-header --header 'cf-access-token: $TOKEN'"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"header":{"name":"header","type":"option"}},"args":[]},"set-token":{"id":"set-token","description":"Sets an API token to authenticate with the Opal server - alternative auth flow for headless environments.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal set-token"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"set-url":{"id":"set-url","description":"Sets the url of the Opal server. Defaults to https://app.opal.dev.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal set-url"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"allowSelfSignedCerts":{"name":"allowSelfSignedCerts","type":"boolean","allowNo":false},"custom":{"name":"custom","type":"option","hidden":true},"prod":{"name":"prod","type":"boolean","hidden":true,"allowNo":false},"demo":{"name":"demo","type":"boolean","hidden":true,"allowNo":false},"dev":{"name":"dev","type":"boolean","hidden":true,"allowNo":false},"devLocal":{"name":"devLocal","type":"boolean","hidden":true,"allowNo":false}},"args":[{"name":"url","description":"URL of the Opal server to use. If unspecified, defaults to https://app.opal.dev","required":false}]},"aws:identity":{"id":"aws:identity","description":"Gets the current caller identity for the \"opal\" AWS profile.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal aws:identity"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"iam-roles:start":{"id":"iam-roles:start","description":"Starts a session to assume an IAM role.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal iam-roles:start","opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398","opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --profileName \"custom-profile\""],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","char":"i","description":"The Opal ID of the resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]"},"sessionId":{"name":"sessionId","type":"option","char":"s","description":"The Opal ID of the session to connect to. Uses an existing session that was created via the web flow."},"refresh":{"name":"refresh","type":"boolean","char":"r","description":"Starts a new session even if one already exists. Useful if a session is about to expire.","allowNo":false},"profileName":{"name":"profileName","type":"option","description":"Uses a custom AWS profile name for the IAM role. Default value is the role's name."}},"args":[]},"kube-roles:start":{"id":"kube-roles:start","description":"Starts a session to assume a Kubernetes cluster IAM role.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal kube-roles:start","opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398","opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId \"arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role\""],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","char":"i","description":"The Opal ID of the resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]"},"accessLevelRemoteId":{"name":"accessLevelRemoteId","type":"option","char":"a","description":"The remote ID of the access level with which to access the resource."},"sessionId":{"name":"sessionId","type":"option","char":"s","description":"The Opal ID of the session to connect to. Uses an existing session that was created via the web flow."},"refresh":{"name":"refresh","type":"boolean","char":"r","description":"Starts a new session even if one already exists. Useful if a session is about to expire.","allowNo":false}},"args":[]},"postgres-instances:start":{"id":"postgres-instances:start","description":"Starts a session to connect to a Postgres database.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal postgres-instances:start","opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398","opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId fullaccess","opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId fullaccess --action view"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","char":"i","description":"The Opal ID of the resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]"},"accessLevelRemoteId":{"name":"accessLevelRemoteId","type":"option","char":"a","description":"The remote ID of the access level with which to access the resource."},"sessionId":{"name":"sessionId","type":"option","char":"s","description":"The Opal ID of the session to connect to. Uses an existing session that was created via the web flow."},"refresh":{"name":"refresh","type":"boolean","char":"r","description":"Starts a new session even if one already exists. Useful if a session is about to expire.","allowNo":false},"action":{"name":"action","type":"option","description":"Method of connecting to the database.\n- open: Open external database app\n- psql: Start psql session in shell\n- view: View connection configuration details","options":["open","psql","view"]}},"args":[]},"resources:get":{"id":"resources:get","description":"Get resource info for a particular resource.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","char":"i","description":"The Opal ID of the resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]"}},"args":[]},"ssh:copyFrom":{"id":"ssh:copyFrom","description":"Use SCP to copy files from a compute instance.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal ssh:copyFrom --src instance/dir --dest my/dir","opal ssh:copyFrom --src instance/dir --dest my/dir --id 51f7176b-0464-4a6f-8369-e951e187b398"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"src":{"name":"src","type":"option","description":"The directory or file you would like to copy over SCP. Note we only support one file or directory at a time.","required":true},"dest":{"name":"dest","type":"option","description":"The directory you want your files to be copied to.","required":false,"default":"."},"user":{"name":"user","type":"option","description":"The user you want to run SCP over. Keep in mind not all users will have access to each other's home directory.","required":false,"default":"ssm-user"},"id":{"name":"id","type":"option","char":"i","description":"The Opal ID of the resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]"},"sessionId":{"name":"sessionId","type":"option","char":"s","description":"The Opal ID of the session to connect to. Uses an existing session that was created via the web flow."}},"args":[]},"ssh:copyTo":{"id":"ssh:copyTo","description":"Use SCP to copy files to a compute instance.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal ssh:copyTo --src my/dir --dest instance/dir","opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"src":{"name":"src","type":"option","description":"The directory or file you would like to copy over SCP. Note we only support one file or directory at a time.","required":true},"dest":{"name":"dest","type":"option","description":"The directory you want your files to be copied to.","required":false,"default":"."},"user":{"name":"user","type":"option","description":"The user you want to run SCP over. Keep in mind not all users will have access to each other's home directory.","required":false,"default":"ssm-user"},"id":{"name":"id","type":"option","char":"i","description":"The Opal ID of the resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]"},"sessionId":{"name":"sessionId","type":"option","char":"s","description":"The Opal ID of the session to connect to. Uses an existing session that was created via the web flow."}},"args":[]},"ssh:start":{"id":"ssh:start","description":"Starts an SSH session to access a compute instance.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal ssh:start","opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","char":"i","description":"The Opal ID of the resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]"},"sessionId":{"name":"sessionId","type":"option","char":"s","description":"The Opal ID of the session to connect to. Uses an existing session that was created via the web flow."},"refresh":{"name":"refresh","type":"boolean","char":"r","description":"Starts a new session even if one already exists. Useful if a session is about to expire.","allowNo":false}},"args":[]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opal-security",
3
3
  "description": "Opal allows you to centrally manage access to all of your sensitive systems.",
4
- "version": "2.1.0",
4
+ "version": "2.1.1",
5
5
  "author": "Stephen Cobbe",
6
6
  "bin": {
7
7
  "opal": "./bin/run"
File without changes
File without changes