Allow insecure localhost
Author: p | 2025-04-25
As per the documentation -allow-insecure-localhost should be precceded by -as follows: options.add_argument('-allow-insecure-localhost') -allow-insecure-localhost : allow-insecure-localhost flag is missing in Chrome 88 - chrome://flags/allow-insecure-localhost
-allow-insecure-localhost -allow-running-insecure-content
Space" strategy include Microsoft SQL Server and MongoDB.For more detailed information about how CockroachDB's spatial indexes work, see Spatial indexes.If you encounter behavior that you think is due to a performance issue, please get in touch using our Support resources.ExamplesLoad NYC data for the PostGIS tutorialFollow the steps below to load the SQL for the NYC data used in the Introduction to PostGIS tutorial.Note:CockroachDB can work with the tutorial up to Chapter 22, with the following exceptions:Do not try to load Shapefiles via the GUI as shown in the tutorial. Instead, follow the steps below to load the SQL data directly into CockroachDB. (We have already converted the tutorial Shapefiles to SQL for you.)CockroachDB does not support GML or KML data.CockroachDB does not support SVG.Before you beginInstall a build of CockroachDB with support for spatial data by following the instructions at Install CockroachDB.Start a local insecure cluster and connect to that cluster from a SQL client:icon/buttons/copycockroach sql --insecure --host=localhost --port=26257Leave this shell open for use in the examples below.Step 1. Load the NYC dataClone the data set: icon/buttons/copy git clone the SQL files into your CockroachDB cluster: icon/buttons/copy cat otan-scripts/geospatial_sql/*.sql | cockroach sql --insecure --host=localhost --port=26257The command above will take a few minutes to run.Step 2. Follow the PostGIS tutorialWhen the cluster is finished loading the data, open a SQL shell and start working through the Introduction to PostGIS tutorial: icon/buttons/copy cockroach sql --insecure --host=localhost --port=26257Use a sample Shapefile datasetThis page has instructions for querying spatial data imported into CockroachDB. On this page, we use a sample Shapefile dataset from the National Oceanic and Atmospheric Administration.Before you beginInstall a build of CockroachDB with support for spatial data by following the instructions at Install CockroachDB.Start a local insecure cluster and connect to that cluster from a SQL client:icon/buttons/copycockroach sql --insecure --host=localhost. As per the documentation -allow-insecure-localhost should be precceded by -as follows: options.add_argument('-allow-insecure-localhost') -allow-insecure-localhost : allow-insecure-localhost flag is missing in Chrome 88 - chrome://flags/allow-insecure-localhost Seems you were pretty close. As per the documentation -allow-insecure-localhost should be precceded by -as follows: options.add_argument('-allow-insecure-localhost') - This article dives into the reasons behind its removal and provides several workarounds to allow insecure localhost connections. For web developers, the allow-insecure-localhost flag in Then ask if you want to connect to the cluster. Each prompt has default values that you can select, or change if you want a different option.Select Parameters only then copy the connection parameters displayed and save them in a secure location.? How would you like to connect? Parameters onlyLooking up cluster ID: succeededCreating SQL user: succeededSuccess! Created SQL user name: maxroach cluster: 37174250-b944-461f-b1c1-3a99edb6af32Retrieving cluster info: succeededConnection parameters Database: defaultdb Host: blue-dog-147.6wr.cockroachlabs.cloud Password: ThisIsNotAGoodPassword Port: 26257 Username: maxroachIf you haven't already, download the CockroachDB binary.Run the cockroach start-single-node command:icon/buttons/copy$ cockroach start-single-node --advertise-addr 'localhost' --insecureThis starts an insecure, single-node cluster.Take note of the following connection information in the SQL shell welcome text:CockroachDB node starting at 2021-08-30 17:25:30.06524 +0000 UTC (took 4.3s)build: CCL v21.1.6 @ 2021/07/20 15:33:43 (go1.15.11)webui: postgresql://root@localhost:26257?sslmode=disableYou'll use the sql connection string to connect to the cluster later in this tutorial.Warning:The --insecure flag used in this tutorial is intended for non-production testing only. To run CockroachDB in production, use a secure cluster instead.Step 2. Get the codeClone the code's GitHub repository:icon/buttons/copy$ git clone [email protected]:cockroachlabs/example-app-typescript-typeorm.gitNavigate to the repo directory and install the application dependencies:icon/buttons/copy$ cd example-app-typescript-typeormicon/buttons/copyStep 3. Configure your CockroachDB connectionOpen the datasource.ts file, and comment out the ssl: true, extra and options configuration properties.In the datasource.ts file, uncomment ssl: { rejectUnauthorized: false }.Warning:Only use ssl: { rejectUnauthorized: false } in development, for insecure connections.The DataSource configuration should look similar to the following:export const AppDataSource = new DataSource({ type: "cockroachdb", url: process.env.DATABASE_URL, ssl: { rejectUnauthorized: false }, // For insecure connections only synchronize: true, logging: false, entities: ["src/entity/**/*.ts"], migrations: ["src/migration/**/*.ts"], subscribers: ["src/subscriber/**/*.ts"],})Set the DATABASE_URL environment variable to the connection string provided in the cockroach welcome text:icon/buttons/copyexport DATABASE_URL="postgresql://root@localhost:26257/defaultdb?sslmode=disable"Set the DATABASE_URL environment variable to a CockroachDB connection string compatible with TypeORM.icon/buttons/copyexport DATABASE_URL=""TypeORM accepts the following format for CockroachDB Standard connection strings:icon/buttons/copypostgresql://:@:/Step 4. RunComments
Space" strategy include Microsoft SQL Server and MongoDB.For more detailed information about how CockroachDB's spatial indexes work, see Spatial indexes.If you encounter behavior that you think is due to a performance issue, please get in touch using our Support resources.ExamplesLoad NYC data for the PostGIS tutorialFollow the steps below to load the SQL for the NYC data used in the Introduction to PostGIS tutorial.Note:CockroachDB can work with the tutorial up to Chapter 22, with the following exceptions:Do not try to load Shapefiles via the GUI as shown in the tutorial. Instead, follow the steps below to load the SQL data directly into CockroachDB. (We have already converted the tutorial Shapefiles to SQL for you.)CockroachDB does not support GML or KML data.CockroachDB does not support SVG.Before you beginInstall a build of CockroachDB with support for spatial data by following the instructions at Install CockroachDB.Start a local insecure cluster and connect to that cluster from a SQL client:icon/buttons/copycockroach sql --insecure --host=localhost --port=26257Leave this shell open for use in the examples below.Step 1. Load the NYC dataClone the data set: icon/buttons/copy git clone the SQL files into your CockroachDB cluster: icon/buttons/copy cat otan-scripts/geospatial_sql/*.sql | cockroach sql --insecure --host=localhost --port=26257The command above will take a few minutes to run.Step 2. Follow the PostGIS tutorialWhen the cluster is finished loading the data, open a SQL shell and start working through the Introduction to PostGIS tutorial: icon/buttons/copy cockroach sql --insecure --host=localhost --port=26257Use a sample Shapefile datasetThis page has instructions for querying spatial data imported into CockroachDB. On this page, we use a sample Shapefile dataset from the National Oceanic and Atmospheric Administration.Before you beginInstall a build of CockroachDB with support for spatial data by following the instructions at Install CockroachDB.Start a local insecure cluster and connect to that cluster from a SQL client:icon/buttons/copycockroach sql --insecure --host=localhost
2025-04-18Then ask if you want to connect to the cluster. Each prompt has default values that you can select, or change if you want a different option.Select Parameters only then copy the connection parameters displayed and save them in a secure location.? How would you like to connect? Parameters onlyLooking up cluster ID: succeededCreating SQL user: succeededSuccess! Created SQL user name: maxroach cluster: 37174250-b944-461f-b1c1-3a99edb6af32Retrieving cluster info: succeededConnection parameters Database: defaultdb Host: blue-dog-147.6wr.cockroachlabs.cloud Password: ThisIsNotAGoodPassword Port: 26257 Username: maxroachIf you haven't already, download the CockroachDB binary.Run the cockroach start-single-node command:icon/buttons/copy$ cockroach start-single-node --advertise-addr 'localhost' --insecureThis starts an insecure, single-node cluster.Take note of the following connection information in the SQL shell welcome text:CockroachDB node starting at 2021-08-30 17:25:30.06524 +0000 UTC (took 4.3s)build: CCL v21.1.6 @ 2021/07/20 15:33:43 (go1.15.11)webui: postgresql://root@localhost:26257?sslmode=disableYou'll use the sql connection string to connect to the cluster later in this tutorial.Warning:The --insecure flag used in this tutorial is intended for non-production testing only. To run CockroachDB in production, use a secure cluster instead.Step 2. Get the codeClone the code's GitHub repository:icon/buttons/copy$ git clone [email protected]:cockroachlabs/example-app-typescript-typeorm.gitNavigate to the repo directory and install the application dependencies:icon/buttons/copy$ cd example-app-typescript-typeormicon/buttons/copyStep 3. Configure your CockroachDB connectionOpen the datasource.ts file, and comment out the ssl: true, extra and options configuration properties.In the datasource.ts file, uncomment ssl: { rejectUnauthorized: false }.Warning:Only use ssl: { rejectUnauthorized: false } in development, for insecure connections.The DataSource configuration should look similar to the following:export const AppDataSource = new DataSource({ type: "cockroachdb", url: process.env.DATABASE_URL, ssl: { rejectUnauthorized: false }, // For insecure connections only synchronize: true, logging: false, entities: ["src/entity/**/*.ts"], migrations: ["src/migration/**/*.ts"], subscribers: ["src/subscriber/**/*.ts"],})Set the DATABASE_URL environment variable to the connection string provided in the cockroach welcome text:icon/buttons/copyexport DATABASE_URL="postgresql://root@localhost:26257/defaultdb?sslmode=disable"Set the DATABASE_URL environment variable to a CockroachDB connection string compatible with TypeORM.icon/buttons/copyexport DATABASE_URL=""TypeORM accepts the following format for CockroachDB Standard connection strings:icon/buttons/copypostgresql://:@:/Step 4. Run
2025-03-29Don't work (despite the permission above), then it seems to be a Chrome bug (separate I think from CORS-for-content-scripts and from Could you please report the bug through and the CORS and/or extensions teams will be able to help further. (Feel free to reply with a bug number here as well.) I am sorry I wasn't able to help further. Best regards,LukaszŁukasz Anforowiczunread,Aug 24, 2020, 8:39:37 AM8/24/20to guest271314, Takashi Toyoshima, Chromium Extensions, Charles Reis, Simeon Vincent, Devlin Cronin, Jackie HanOn Mon, Aug 24, 2020 at 8:34 AM Łukasz Anforowicz [email protected]> wrote:Does this affect the ability to make cross-origin requests in background scripts?CORS-for-content-script changes (that will soon begin rolling out with Chrome 85 to the Stable channel) should *not* affect the behavior of extension background pages. Only the behavior of content scripts should be affected. Currently it does not appear to be possible to fetch() localhost from a background script, even when --disable-web-security is set and localhost is listed in treat insecure origins as secure. Am working on a project with two paths ( where the capability to fetch() from localhost is the current restriction to further testing.I see that is related to Native Messaging (rather than to XHR/fetch). For example, I don't see the string "localhost" or "127.0.0.1" mentioned in the bug.Kindly illuminate what the official procedure is to make a cross-origin request to localhost using fetch() ( without a network error being thrown.I think that if the extension manifest asks for permission to localhost, then CORS/CORB-bypassing-fetch/XHR to localhost should
2025-04-22Me clarify though that the CORS-for-content-scripts have also been announced via:Chrome Enterprise Release Notes (since Chrome 81).We *did* send individual emails to authors of the potentially affected extensions (ones caught by telemetry in earlier Chrome versions). Email addresses were indeed taken from the CWS database.Thanks,Lukaszguest271314unread,Aug 23, 2020, 6:23:43 AM8/23/20to Chromium Extensions, Łukasz Anforowicz, Chromium Extensions, Charles Reis, Simeon Vincent, Devlin Cronin, Jackie HanInter Netunread,Aug 23, 2020, 8:25:04 AM8/23/20to Chromium Extensions, Łukasz Anforowicz, Charles Reis, Simeon Vincent, Devlin Croninchrome://flags/#force-empty-CORB-and-CORS-allowlist Does not exist in my flags Łukasz Anforowiczunread,Aug 24, 2020, 8:35:38 AM8/24/20to guest271314, Chromium Extensions, Charles Reis, Simeon Vincent, Devlin Cronin, Jackie HanDoes this affect the ability to make cross-origin requests in background scripts?CORS-for-content-script changes (that will soon begin rolling out with Chrome 85 to the Stable channel) should *not* affect the behavior of extension background pages. Only the behavior of content scripts should be affected. Currently it does not appear to be possible to fetch() localhost from a background script, even when --disable-web-security is set and localhost is listed in treat insecure origins as secure. Am working on a project with two paths ( where the capability to fetch() from localhost is the current restriction to further testing.I see that is related to Native Messaging (rather than to XHR/fetch). For example, I don't see the string "localhost" or "127.0.0.1" mentioned in the bug.I think that if the extension manifest asks for permission to localhost, then CORS/CORB-bypassing-fetch/XHR to localhost should work from extension background pages:If localhost XHRs/fetches from an extension background page
2025-04-194.4.9.3 Using the Authentication Plugins To compile and install a plugin library file, use the instructions in Section 4.4.3, “Compiling and Installing Plugin Libraries”. To make the library file available for use, install it in the plugin directory (the directory named by the plugin_dir system variable). Register the server-side plugin with the server. For example, to load the plugin at server startup, use a --plugin-load=auth_simple.so option, adjusting the .so suffix for your platform as necessary. Create a user for whom the server will use the auth_simple plugin for authentication: mysql> CREATE USER 'x'@'localhost' -> IDENTIFIED WITH auth_simple; Use a client program to connect to the server as user x. The server-side auth_simple plugin communicates with the client program that it should use the client-side auth_simple plugin, and the latter sends the password to the server. The server plugin should reject connections that send an empty password and accept connections that send a nonempty password. Invoke the client program each way to verify this: $> mysql --user=x --skip-passwordERROR 1045 (28000): Access denied for user 'x'@'localhost' (using password: NO)$> mysql --user=x --passwordEnter password: abcmysql> Because the server plugin accepts any nonempty password, it should be considered insecure. After testing the plugin to verify that it works, restart the server without the --plugin-load option so as not to indavertently leave the server running with an insecure authentication plugin loaded. Also, drop the user with DROP USER 'x'@'localhost'. For additional information about loading and using authentication plugins, see Installing and Uninstalling Plugins, and Pluggable Authentication. If you are writing a client program that supports the use of authentication plugins, normally such a program causes a plugin to be loaded by calling mysql_options() to set the MYSQL_DEFAULT_AUTH and MYSQL_PLUGIN_DIR options: char *plugin_dir = "path_to_plugin_dir";char *default_auth = "plugin_name";/* ... process command-line options ... */mysql_options(&mysql, MYSQL_PLUGIN_DIR, plugin_dir);mysql_options(&mysql, MYSQL_DEFAULT_AUTH, default_auth); Typically, the program will also accept --plugin-dir and --default-auth options that enable users to override the default values. Should a client program require lower-level plugin management, the client library contains functions that take an st_mysql_client_plugin argument. See C API Client Plugin Interface.
2025-03-27