Re: Changing Cloud Controller Database (CC_DB) encryption key after the DB has been created?

Sandy Cash Jr <lhcash@...>

The key is used in a field encryptor - so if you change the key, you can no
longer decrypt encrypted fields in the database (at least, this is my gut
instinct about what you're seeing). My guess is that, if you change the
encryption key, you need a procedure which includes saving the old key long
enough to decrypt the fields, then re-encrypt them using the new key.
There are definite transaction boundaries you'd need to observe before
throwing away the previous key.

My $0.02,


Sandy Cash
Certified Senior IT Architect/Senior SW Engineer
IBM BlueMix
(919) 543-0209

"I skate to where the puck is going to be, not to where it has been.” -
Wayne Gretzky

From: "Daniel van Dorp" <daniel(a)>
To: cf-dev(a)
Date: 11/06/2015 10:19 AM
Subject: [cf-dev] Changing Cloud Controller Database (CC_DB) encryption
key after the DB has been created?

This is a follow-up of this Google Groups conversation:

Basically, for a development installation setup via this:

I want to change the secret over there to a random-generated value instead.

When I do this before using the installation (eg. creating spaces and
apps), all is well.

However, if I do this after using the installation, I get these errors:
Error finding available spaces
Server error, status code: 500, error code: 10001, message: An unknown
error occurred.

Pretty much what was mentioned here:

On the conversation that I'm trying to follow-up here (
), it is stated:
"you can't change your DB encryption key in your manifest after the DB has
been created!"

That would mean, that after using an installation, you can never change
your secrets for the CC_DB again?
I find that hard to believe personally, since the secret can be changed
just fine at a lot, if not all, other places within CF.
There should be a workaround/manual fix/procedure for this kind of change
to the CC_DB, I think?

Join { to automatically receive all group messages.