Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cloud-native): remove unused password files for locking and persistence #9993

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
4 changes: 0 additions & 4 deletions docker-jans-auth-server/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
from jans.pycloudlib.persistence.couchbase import render_couchbase_properties
from jans.pycloudlib.persistence.couchbase import sync_couchbase_cert
from jans.pycloudlib.persistence.couchbase import sync_couchbase_truststore
from jans.pycloudlib.persistence.couchbase import sync_couchbase_password
from jans.pycloudlib.persistence.hybrid import render_hybrid_properties
from jans.pycloudlib.persistence.spanner import render_spanner_properties
from jans.pycloudlib.persistence.spanner import sync_google_credentials
from jans.pycloudlib.persistence.sql import render_sql_properties
from jans.pycloudlib.persistence.sql import sync_sql_password
from jans.pycloudlib.persistence.utils import render_base_properties
from jans.pycloudlib.persistence.utils import render_salt
from jans.pycloudlib.persistence.utils import PersistenceMapper
Expand Down Expand Up @@ -49,7 +47,6 @@ def main():
render_hybrid_properties(hybrid_prop)

if "couchbase" in persistence_groups:
sync_couchbase_password(manager)
render_couchbase_properties(
manager,
"/app/templates/jans-couchbase.properties",
Expand All @@ -61,7 +58,6 @@ def main():
sync_couchbase_truststore(manager)

if "sql" in persistence_groups:
sync_sql_password(manager)
db_dialect = os.environ.get("CN_SQL_DB_DIALECT", "mysql")
render_sql_properties(
manager,
Expand Down
4 changes: 0 additions & 4 deletions docker-jans-casa/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from jans.pycloudlib.persistence.couchbase import id_from_dn
from jans.pycloudlib.persistence.couchbase import render_couchbase_properties
from jans.pycloudlib.persistence.couchbase import sync_couchbase_cert
from jans.pycloudlib.persistence.couchbase import sync_couchbase_password
from jans.pycloudlib.persistence.couchbase import sync_couchbase_truststore
from jans.pycloudlib.persistence.hybrid import render_hybrid_properties
from jans.pycloudlib.persistence.spanner import render_spanner_properties
Expand All @@ -22,7 +21,6 @@
from jans.pycloudlib.persistence.sql import doc_id_from_dn
from jans.pycloudlib.persistence.sql import render_sql_properties
from jans.pycloudlib.persistence.sql import SqlClient
from jans.pycloudlib.persistence.sql import sync_sql_password
from jans.pycloudlib.persistence.utils import PersistenceMapper
from jans.pycloudlib.persistence.utils import render_base_properties
from jans.pycloudlib.persistence.utils import render_salt
Expand Down Expand Up @@ -130,7 +128,6 @@ def main():
render_hybrid_properties("/etc/jans/conf/jans-hybrid.properties")

if "couchbase" in persistence_groups:
sync_couchbase_password(manager)
render_couchbase_properties(
manager,
"/app/templates/jans-couchbase.properties",
Expand All @@ -142,7 +139,6 @@ def main():
sync_couchbase_truststore(manager)

if "sql" in persistence_groups:
sync_sql_password(manager)
db_dialect = os.environ.get("CN_SQL_DB_DIALECT", "mysql")
render_sql_properties(
manager,
Expand Down
10 changes: 0 additions & 10 deletions docker-jans-certmanager/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
import click

from jans.pycloudlib import get_manager
from jans.pycloudlib.persistence.couchbase import sync_couchbase_password
from jans.pycloudlib.persistence.spanner import sync_google_credentials
from jans.pycloudlib.persistence.sql import sync_sql_password
from jans.pycloudlib.persistence.utils import PersistenceMapper

from settings import LOGGING_CONFIG
Expand Down Expand Up @@ -71,10 +69,6 @@ def patch(service, dry_run, opts):
backend_type = mapper.mapping["default"]

match backend_type:
case "sql":
sync_sql_password(manager)
case "couchbase":
sync_couchbase_password(manager)
case "spanner":
sync_google_credentials(manager)

Expand Down Expand Up @@ -107,10 +101,6 @@ def prune(service, dry_run, opts):
backend_type = mapper.mapping["default"]

match backend_type:
case "sql":
sync_sql_password(manager)
case "couchbase":
sync_couchbase_password(manager)
case "spanner":
sync_google_credentials(manager)

Expand Down
4 changes: 0 additions & 4 deletions docker-jans-config-api/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from jans.pycloudlib.persistence.couchbase import id_from_dn
from jans.pycloudlib.persistence.couchbase import render_couchbase_properties
from jans.pycloudlib.persistence.couchbase import sync_couchbase_cert
from jans.pycloudlib.persistence.couchbase import sync_couchbase_password
from jans.pycloudlib.persistence.couchbase import sync_couchbase_truststore
from jans.pycloudlib.persistence.hybrid import render_hybrid_properties
from jans.pycloudlib.persistence.spanner import render_spanner_properties
Expand All @@ -24,7 +23,6 @@
from jans.pycloudlib.persistence.sql import doc_id_from_dn
from jans.pycloudlib.persistence.sql import SqlClient
from jans.pycloudlib.persistence.sql import render_sql_properties
from jans.pycloudlib.persistence.sql import sync_sql_password
from jans.pycloudlib.persistence.utils import PersistenceMapper
from jans.pycloudlib.persistence.utils import render_base_properties
from jans.pycloudlib.persistence.utils import render_salt
Expand Down Expand Up @@ -60,7 +58,6 @@ def main():
render_hybrid_properties(hybrid_prop)

if "couchbase" in persistence_groups:
sync_couchbase_password(manager)
render_couchbase_properties(
manager,
"/app/templates/jans-couchbase.properties",
Expand All @@ -72,7 +69,6 @@ def main():
sync_couchbase_truststore(manager)

if "sql" in persistence_groups:
sync_sql_password(manager)
db_dialect = os.environ.get("CN_SQL_DB_DIALECT", "mysql")
render_sql_properties(
manager,
Expand Down
13 changes: 0 additions & 13 deletions docker-jans-configurator/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

from jans.pycloudlib import get_manager
from jans.pycloudlib import wait_for
from jans.pycloudlib.persistence.couchbase import sync_couchbase_password
from jans.pycloudlib.persistence.couchbase import sync_couchbase_superuser_password
from jans.pycloudlib.persistence.spanner import sync_google_credentials
from jans.pycloudlib.persistence.sql import sync_sql_password
from jans.pycloudlib.persistence.utils import PersistenceMapper
from jans.pycloudlib.utils import get_random_chars
from jans.pycloudlib.utils import get_sys_random_chars
Expand Down Expand Up @@ -526,11 +523,6 @@ def load(configuration_file, dump_file):
backend_type = mapper.mapping["default"]

match backend_type:
case "sql":
sync_sql_password(manager)
case "couchbase":
sync_couchbase_superuser_password(manager)
sync_couchbase_password(manager)
case "spanner":
sync_google_credentials(manager)

Expand Down Expand Up @@ -575,11 +567,6 @@ def dump(dump_file):
backend_type = mapper.mapping["default"]

match backend_type:
case "sql":
sync_sql_password(manager)
case "couchbase":
sync_couchbase_superuser_password(manager)
sync_couchbase_password(manager)
case "spanner":
sync_google_credentials(manager)

Expand Down
4 changes: 0 additions & 4 deletions docker-jans-fido2/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
from jans.pycloudlib.persistence.couchbase import CouchbaseClient
from jans.pycloudlib.persistence.couchbase import render_couchbase_properties
from jans.pycloudlib.persistence.couchbase import sync_couchbase_cert
from jans.pycloudlib.persistence.couchbase import sync_couchbase_password
from jans.pycloudlib.persistence.couchbase import sync_couchbase_truststore
from jans.pycloudlib.persistence.hybrid import render_hybrid_properties
from jans.pycloudlib.persistence.spanner import render_spanner_properties
from jans.pycloudlib.persistence.spanner import SpannerClient
from jans.pycloudlib.persistence.spanner import sync_google_credentials
from jans.pycloudlib.persistence.sql import SqlClient
from jans.pycloudlib.persistence.sql import render_sql_properties
from jans.pycloudlib.persistence.sql import sync_sql_password
from jans.pycloudlib.persistence.utils import PersistenceMapper
from jans.pycloudlib.persistence.utils import render_base_properties
from jans.pycloudlib.persistence.utils import render_salt
Expand Down Expand Up @@ -50,7 +48,6 @@ def main():
render_hybrid_properties(hybrid_prop)

if "couchbase" in persistence_groups:
sync_couchbase_password(manager)
render_couchbase_properties(
manager,
"/app/templates/jans-couchbase.properties",
Expand All @@ -62,7 +59,6 @@ def main():
sync_couchbase_truststore(manager)

if "sql" in persistence_groups:
sync_sql_password(manager)
db_dialect = os.environ.get("CN_SQL_DB_DIALECT", "mysql")
render_sql_properties(
manager,
Expand Down
4 changes: 0 additions & 4 deletions docker-jans-keycloak-link/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
from jans.pycloudlib.persistence.couchbase import render_couchbase_properties
from jans.pycloudlib.persistence.couchbase import sync_couchbase_cert
from jans.pycloudlib.persistence.couchbase import sync_couchbase_truststore
from jans.pycloudlib.persistence.couchbase import sync_couchbase_password
from jans.pycloudlib.persistence.hybrid import render_hybrid_properties
from jans.pycloudlib.persistence.spanner import render_spanner_properties
from jans.pycloudlib.persistence.spanner import SpannerClient
from jans.pycloudlib.persistence.spanner import sync_google_credentials
from jans.pycloudlib.persistence.sql import SqlClient
from jans.pycloudlib.persistence.sql import render_sql_properties
from jans.pycloudlib.persistence.sql import sync_sql_password
from jans.pycloudlib.persistence.utils import PersistenceMapper
from jans.pycloudlib.persistence.utils import render_base_properties
from jans.pycloudlib.persistence.utils import render_salt
Expand Down Expand Up @@ -58,7 +56,6 @@ def main():
render_hybrid_properties(hybrid_prop)

if "couchbase" in persistence_groups:
sync_couchbase_password(manager)
render_couchbase_properties(
manager,
"/app/templates/jans-couchbase.properties",
Expand All @@ -70,7 +67,6 @@ def main():
sync_couchbase_truststore(manager)

if "sql" in persistence_groups:
sync_sql_password(manager)
db_dialect = os.environ.get("CN_SQL_DB_DIALECT", "mysql")
render_sql_properties(
manager,
Expand Down
4 changes: 0 additions & 4 deletions docker-jans-link/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@
from jans.pycloudlib.persistence.couchbase import CouchbaseClient
from jans.pycloudlib.persistence.couchbase import render_couchbase_properties
from jans.pycloudlib.persistence.couchbase import sync_couchbase_cert
from jans.pycloudlib.persistence.couchbase import sync_couchbase_password
from jans.pycloudlib.persistence.couchbase import sync_couchbase_truststore
from jans.pycloudlib.persistence.hybrid import render_hybrid_properties
from jans.pycloudlib.persistence.spanner import render_spanner_properties
from jans.pycloudlib.persistence.spanner import SpannerClient
from jans.pycloudlib.persistence.spanner import sync_google_credentials
from jans.pycloudlib.persistence.sql import render_sql_properties
from jans.pycloudlib.persistence.sql import SqlClient
from jans.pycloudlib.persistence.sql import sync_sql_password
from jans.pycloudlib.persistence.utils import PersistenceMapper
from jans.pycloudlib.persistence.utils import render_base_properties
from jans.pycloudlib.persistence.utils import render_salt
Expand Down Expand Up @@ -59,7 +57,6 @@ def main():
render_hybrid_properties(hybrid_prop)

if "couchbase" in persistence_groups:
sync_couchbase_password(manager)
render_couchbase_properties(
manager,
"/app/templates/jans-couchbase.properties",
Expand All @@ -71,7 +68,6 @@ def main():
sync_couchbase_truststore(manager)

if "sql" in persistence_groups:
sync_sql_password(manager)
db_dialect = os.environ.get("CN_SQL_DB_DIALECT", "mysql")
render_sql_properties(
manager,
Expand Down
11 changes: 0 additions & 11 deletions docker-jans-persistence-loader/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

from jans.pycloudlib import get_manager
from jans.pycloudlib import wait_for_persistence_conn
from jans.pycloudlib.persistence.couchbase import sync_couchbase_password
from jans.pycloudlib.persistence.couchbase import sync_couchbase_superuser_password
from jans.pycloudlib.persistence.spanner import sync_google_credentials
from jans.pycloudlib.persistence.sql import sync_sql_password
from jans.pycloudlib.persistence.utils import PersistenceMapper

from hybrid_setup import HybridBackend
Expand Down Expand Up @@ -33,14 +30,6 @@ def main():

persistence_groups = PersistenceMapper().groups().keys()

if "sql" in persistence_groups:
sync_sql_password(manager)

if "couchbase" in persistence_groups:
# superuser is required to create buckets, etc.
sync_couchbase_superuser_password(manager)
sync_couchbase_password(manager)

if "spanner" in persistence_groups:
sync_google_credentials(manager)

Expand Down
4 changes: 0 additions & 4 deletions docker-jans-saml/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@
from jans.pycloudlib.persistence.couchbase import CouchbaseClient
from jans.pycloudlib.persistence.couchbase import render_couchbase_properties
from jans.pycloudlib.persistence.couchbase import sync_couchbase_cert
from jans.pycloudlib.persistence.couchbase import sync_couchbase_password
from jans.pycloudlib.persistence.couchbase import sync_couchbase_truststore
from jans.pycloudlib.persistence.hybrid import render_hybrid_properties
from jans.pycloudlib.persistence.spanner import render_spanner_properties
from jans.pycloudlib.persistence.spanner import SpannerClient
from jans.pycloudlib.persistence.spanner import sync_google_credentials
from jans.pycloudlib.persistence.sql import SqlClient
from jans.pycloudlib.persistence.sql import render_sql_properties
from jans.pycloudlib.persistence.sql import sync_sql_password
from jans.pycloudlib.persistence.utils import PersistenceMapper
from jans.pycloudlib.persistence.utils import render_base_properties
from jans.pycloudlib.persistence.utils import render_salt
Expand Down Expand Up @@ -87,7 +85,6 @@ def main():
render_hybrid_properties(hybrid_prop)

if "couchbase" in persistence_groups:
sync_couchbase_password(manager)
render_couchbase_properties(
manager,
"/app/templates/jans-couchbase.properties",
Expand All @@ -100,7 +97,6 @@ def main():
extract_common_libs("couchbase")

if "sql" in persistence_groups:
sync_sql_password(manager)
db_dialect = os.environ.get("CN_SQL_DB_DIALECT", "mysql")
render_sql_properties(
manager,
Expand Down
4 changes: 0 additions & 4 deletions docker-jans-scim/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
from jans.pycloudlib.persistence.couchbase import CouchbaseClient
from jans.pycloudlib.persistence.couchbase import render_couchbase_properties
from jans.pycloudlib.persistence.couchbase import sync_couchbase_cert
from jans.pycloudlib.persistence.couchbase import sync_couchbase_password
from jans.pycloudlib.persistence.couchbase import sync_couchbase_truststore
from jans.pycloudlib.persistence.hybrid import render_hybrid_properties
from jans.pycloudlib.persistence.spanner import render_spanner_properties
from jans.pycloudlib.persistence.spanner import SpannerClient
from jans.pycloudlib.persistence.spanner import sync_google_credentials
from jans.pycloudlib.persistence.sql import render_sql_properties
from jans.pycloudlib.persistence.sql import SqlClient
from jans.pycloudlib.persistence.sql import sync_sql_password
from jans.pycloudlib.persistence.utils import PersistenceMapper
from jans.pycloudlib.persistence.utils import render_base_properties
from jans.pycloudlib.persistence.utils import render_salt
Expand Down Expand Up @@ -64,7 +62,6 @@ def main():
render_hybrid_properties(hybrid_prop)

if "couchbase" in persistence_groups:
sync_couchbase_password(manager)
render_couchbase_properties(
manager,
"/app/templates/jans-couchbase.properties",
Expand All @@ -76,7 +73,6 @@ def main():
sync_couchbase_truststore(manager)

if "sql" in persistence_groups:
sync_sql_password(manager)
db_dialect = os.environ.get("CN_SQL_DB_DIALECT", "mysql")
render_sql_properties(
manager,
Expand Down
2 changes: 0 additions & 2 deletions jans-pycloudlib/docs/guides/container_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ from jans.pycloudlib import get_manager
from jans.pycloudlib.persistence.utils import render_salt
from jans.pycloudlib.persistence.utils import render_base_properties
from jans.pycloudlib.persistence.sql import render_sql_properties
from jans.pycloudlib.persistence.sql import sync_sql_password


def create_manager():
Expand All @@ -162,7 +161,6 @@ def configure_persistence(manager):
"/app/templates/jans-mysql.properties",
"/etc/jans/conf/jans-mysql.properties",
)
sync_sql_password(manager)


if __name__ == "__main__":
Expand Down
Loading
Loading