harbor icon indicating copy to clipboard operation
harbor copied to clipboard

should add redis sentinel password support

Open bitsf opened this issue 3 years ago • 30 comments

old redis sentinel server version (4.x) doesn't support AUTH command, however current version (6.x) has already support this, we should also support it.

redis-server sentinel.conf --sentinel --requirepass 456 redis-cli -h redis-sentinel-1 AUTH 456

bitsf avatar Apr 27 '21 03:04 bitsf

consider add a new param sentinel_password in the redis url redis+sentinel://:pass1@host1:26379,host2:26379/mymaster/1?idle_timeout_seconds=30&sentinel_password=pass2

bitsf avatar Apr 27 '21 03:04 bitsf

well, this fix is a little complex, need first be supported in the upstream trivy and also need patch chartserver and registry and beego also not support.

not sure if this is really a strong requirement in community.

bitsf avatar Apr 27 '21 04:04 bitsf

To solve this problem, do you have any plans to upgrade and repair in the near future? About supporting redis + sentinel to add passwords, we need to support this method now.

1224566146 avatar Apr 04 '22 12:04 1224566146

@wy65701436 @bitsf

1224566146 avatar Apr 05 '22 06:04 1224566146

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] avatar Jul 06 '22 09:07 github-actions[bot]

Hello @bitsf @wy65701436, facing the same issue here, is disabling AUTH the only way to use Harbor with Redis Sentinel right now? Is there any plan to support sentinel auth in the near future?

Thanks :)

kzgrzendek avatar Jul 13 '22 15:07 kzgrzendek

Hello, any plans to implement Sentinel AUTH? I have tested goharbor/harbor v1.9.3 helm chart and it doesn't work (my config is here https://github.com/bitnami/charts/issues/11354#issuecomment-1199794508). Here https://github.com/goharbor/harbor/issues/16907#issuecomment-1153092617 it seems that with registry it should be working, but core and jobservice don't work. I also found another opened issue regarding sentinel auth: https://github.com/goharbor/harbor/issues/17244

Could you please amend title of this issue and add "AUTH" to it so it is more visible in searches?

RichardSufliarsky avatar Aug 04 '22 09:08 RichardSufliarsky

Looking at the code, maybe there could be some parameter indicating to use AUTH with Sentinel and then use redisOptions instead of sentinelOptions https://github.com/goharbor/harbor/blob/41105b5191cd18ff1d35433bf908bffff7186abc/src/lib/redis/redisclient.go#L144 as password is appended to redisOptions here https://github.com/goharbor/harbor/blob/41105b5191cd18ff1d35433bf908bffff7186abc/src/lib/redis/redisclient.go#L123 Seems that it gets more complicated if Sentinel and Redis passwords are not the same but there is no such config option in values.yaml currently.

@zyyw, could you please look also at this issue?

RichardSufliarsky avatar Aug 04 '22 10:08 RichardSufliarsky

I'm seeing this same thing as well.

kevinlmadison avatar Oct 13 '22 14:10 kevinlmadison

I'm facing on this issue as well.

helm chart: harbor-1.10.1
app version: 2.6.1

redis: 2022/10/18 07:25:48 sentinel.go:514: sentinel: GetMasterAddrByName master="harbor-redis" failed: NOAUTH Authentication required.
redis: 2022/10/18 07:25:48 sentinel.go:514: sentinel: GetMasterAddrByName master="harbor-redis" failed: NOAUTH Authentication required.
redis: 2022/10/18 07:25:48 sentinel.go:514: sentinel: GetMasterAddrByName master="harbor-redis" failed: NOAUTH Authentication required.
2022-10-18T07:25:48Z [ERROR] [/lib/cache/cache.go:114]: failed to ping redis+sentinel://redis-sentinel-node-0.redis-sentinel-headless.harbor2.svc.cluster.local:26379,redis-sentinel-node-1.redis-sentinel-headless.harbor2.svc.cluster.local:26379,redis-sentinel-node-2.redis-sentinel-headless.harbor2.svc.cluster.local:26379/harbor-redis/0?idle_timeout_seconds=30, retry after 10s : redis: all sentinels specified in configuration are unreachable

shanaider avatar Oct 18 '22 11:10 shanaider

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] avatar Dec 18 '22 09:12 github-actions[bot]

Still same problem with chart version 1.11.0.

cyvcloud avatar Jan 10 '23 14:01 cyvcloud

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] avatar Mar 13 '23 09:03 github-actions[bot]

This issue is still relevant to us.

figaw avatar Apr 04 '23 11:04 figaw

Same too

es-x avatar Apr 17 '23 11:04 es-x

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] avatar Jun 17 '23 09:06 github-actions[bot]

Unstale.

n9 avatar Jul 08 '23 07:07 n9

How can you claim to support sentinel but then authentication just isn't supported??? Please implement this ASAP as harbor is currently unusable for us without AUTH support with sentinel.

davidpanic avatar Aug 24 '23 09:08 davidpanic

Still seeing the same issue with chart version harbor-17.1.1.

My only work arounds at the moment is to run 2 redis clusters within my ecosystem:

  1. one for all services except harbor
  2. an insecure, unauthenticated cluster for harbor or the internal redis cluster that comes with the helm chart (current choice for the short term)

Any news, given this has been open a while?

GizzmoAsus avatar Sep 14 '23 08:09 GizzmoAsus

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] avatar Nov 13 '23 09:11 github-actions[bot]

Not stale, still an issue

davidpanic avatar Nov 14 '23 10:11 davidpanic

I'm facing the same issue !

  • Chart version: 1.13.0
  • Harbor version: v2.9.1

pierreblais avatar Nov 21 '23 13:11 pierreblais

i dont know how hard it is to fix this issue, can we just simply replace here with

o.SentinelUsername, o.SentinelPassword = getUserPassword(u)

CoderYellow avatar Jan 21 '24 08:01 CoderYellow

Still an issue for app version 2.10.0 installed using Helm chart. Please fix or don't claim the support of Sentinel as it is not working correctly and not providing basic, crucial functionality. Disabling AUTH should not be a solution for this.

jwojnarowicz avatar Feb 12 '24 08:02 jwojnarowicz

Hello, I'm facing the same issue, @zyyw can we have an update about that please ?

olivierPaq avatar Feb 16 '24 17:02 olivierPaq

Hello @bitsf @wy65701436, facing the same issue here, is disabling AUTH the only way to use Harbor with Redis Sentinel right now? Is there any plan to support sentinel auth in the near future?

Thanks :)

Still an issue for us

kzgrzendek avatar Apr 08 '24 07:04 kzgrzendek