Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
![Baton Logo](./docs/images/baton-logo.png)

# `baton-postgresql` [![Go Reference](https://pkg.go.dev/badge/github.com/conductorone/baton-postgresql.svg)](https://pkg.go.dev/github.com/conductorone/baton-postgresql) ![main ci](https://github.com/conductorone/baton-postgresql/actions/workflows/main.yaml/badge.svg)
#

`baton-postgresql` is a connector for PostgreSQL built using the [Baton SDK](https://github.com/conductorone/baton-sdk). It connects to a PostgreSQL database and syncs data about which roles have access to which resources within the database.
`baton-postgresql` [![Go Reference](https://pkg.go.dev/badge/github.com/conductorone/baton-postgresql.svg)](https://pkg.go.dev/github.com/conductorone/baton-postgresql) ![main ci](https://github.com/conductorone/baton-postgresql/actions/workflows/main.yaml/badge.svg)

`baton-postgresql` is a connector for PostgreSQL built using the [Baton SDK](https://github.com/conductorone/baton-sdk).
It connects to a PostgreSQL database and syncs data about which roles have access to which resources within the
database.

Check out [Baton](https://github.com/conductorone/baton) to learn more about the project in general.

# Getting Started

Needs postgresql DSN, if no database is selected in the DSN, it will use all databases.

## Troubleshooting

If you are having issues with the connector, please check the following:

- Specified database
- User needs permission to access the database, this will cause missing resources.
- Not specified database
- User needs permission for each database, otherwise it will not be able to read the resources for that database.

## brew

```
Expand Down Expand Up @@ -47,11 +62,14 @@ baton resources
- Columns
- Large Objects

By default, `baton-postgresql` will only sync information from the `public` schema. You can use the `--schemas` flag to specify other schemas.
By default, `baton-postgresql` will only sync information from the `public` schema. You can use the `--schemas` flag to
specify other schemas.

# Contributing, Support and Issues

We started Baton because we were tired of taking screenshots and manually building spreadsheets. We welcome contributions, and ideas, no matter how small -- our goal is to make identity and permissions sprawl less painful for everyone. If you have questions, problems, or ideas: Please open a Github Issue!
We started Baton because we were tired of taking screenshots and manually building spreadsheets. We welcome
contributions, and ideas, no matter how small -- our goal is to make identity and permissions sprawl less painful for
everyone. If you have questions, problems, or ideas: Please open a Github Issue!

See [CONTRIBUTING.md](https://github.com/ConductorOne/baton/blob/main/CONTRIBUTING.md) for more details.

Expand Down
36 changes: 20 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ module github.com/conductorone/baton-postgresql

go 1.23.4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify Go version specification.

The Go version is specified as 1.23.4, which appears to be ahead of the latest released version as of when this review is being conducted. Consider verifying if this is the correct version you intend to use or if it should be updated to the latest stable release.


🌐 Web query:

What is the latest released version of Go programming language?

💡 Result:

The latest released version of the Go programming language is Go 1.24.2, which was released on April 1, 2025[1][3][8]. This release includes security fixes, as well as bug fixes for the compiler, runtime, the go command, and various standard library packages such as crypto/tls, go/types, net/http, and testing[1].

Here’s a summary of recent Go releases:

Version Release Date Notable Notes
1.24.2 2025-04-01 Latest stable release (security and bug fixes)
1.24.1 2025-03-04 Security and bug fixes
1.24.0 2025-02-11 Major release with new features

Go 1.25 is not yet released as of mid-April 2025[7].

For the latest updates and details on new features, you can consult the official Go release history[1][3][8].

Citations:


Update Go version to the latest stable release

The go directive in go.mod is currently set to 1.23.4, which is behind the latest stable release (Go 1.24.2 as of April 1, 2025). Please update it to benefit from the most recent security patches and bug fixes.

• File: go.mod
Line 3:

-go 1.23.4
+go 1.24.2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
go 1.23.4
go 1.24.2


toolchain go1.24.1

require (
github.com/conductorone/baton-sdk v0.2.84
github.com/conductorone/baton-sdk v0.2.93
github.com/ennyjfrick/ruleguard-logfatal v0.0.2
github.com/georgysavva/scany v1.2.2
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/jackc/pgconn v1.14.3
github.com/jackc/pgx/v4 v4.18.3
github.com/quasilyte/go-ruleguard/dsl v0.3.22
github.com/spf13/viper v1.19.0
Expand All @@ -33,17 +32,17 @@ require (
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.10 // indirect
github.com/aws/aws-sdk-go-v2/service/lambda v1.70.1 // indirect
github.com/aws/aws-sdk-go-v2/service/lambda v1.71.0 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.75.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.12 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.11 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.10 // indirect
github.com/aws/smithy-go v1.22.2 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/conductorone/dpop v0.2.2 // indirect
github.com/conductorone/dpop/integrations/dpop_grpc v0.2.2 // indirect
github.com/conductorone/dpop/integrations/dpop_oauth2 v0.2.2 // indirect
github.com/conductorone/dpop v0.2.3 // indirect
github.com/conductorone/dpop/integrations/dpop_grpc v0.2.3 // indirect
github.com/conductorone/dpop/integrations/dpop_oauth2 v0.2.3 // indirect
github.com/deckarep/golang-set/v2 v2.7.0 // indirect
github.com/dolthub/maphash v0.1.0 // indirect
github.com/doug-martin/goqu/v9 v9.19.0 // indirect
Expand All @@ -52,17 +51,16 @@ require (
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/gammazero/deque v1.0.0 // indirect
github.com/glebarez/go-sqlite v1.22.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.3 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
Expand All @@ -79,7 +77,9 @@ require (
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/pquerna/cachecontrol v0.2.0 // indirect
github.com/pquerna/xjwt v0.3.0 // indirect
github.com/pquerna/xjwt/xkeyset v0.0.0-20241217022915-10fc997b2a9f // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
Expand All @@ -96,13 +96,17 @@ require (
github.com/tklauser/numcpus v0.9.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/bridges/otelzap v0.10.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
go.opentelemetry.io/otel v1.34.0 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.11.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
go.opentelemetry.io/otel/metric v1.34.0 // indirect
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
go.opentelemetry.io/otel/trace v1.34.0 // indirect
go.opentelemetry.io/otel/log v0.11.0 // indirect
go.opentelemetry.io/otel/metric v1.35.0 // indirect
go.opentelemetry.io/otel/sdk v1.35.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.11.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/ratelimit v0.3.1 // indirect
Expand All @@ -113,9 +117,9 @@ require (
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.22.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 // indirect
google.golang.org/grpc v1.70.0 // indirect
google.golang.org/grpc v1.71.0 // indirect
google.golang.org/protobuf v1.36.5 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading
Loading