vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Click the channel that contains the organization MSP that you want to update and open it.
3. Click the Channel details tab.
4. Click the associated channel member's tile that you want to update.
5. If you have not already imported the updated MSP definition into the console, you can upload the file here. Note: This action will not update the associated MSP definition in the Organizations tab. If you have already updated the MSP definition in the Organizations tab of the console, you can select it from the drop-down list.









 Removing an organization 

If you want to stop using an instance of the IBM Blockchain Platform, you need to remove your organization from the blockchain network before you delete your service instance. This ensures that the removed organization is not affecting the governance of the network after it has left the network. You can remove your organization by using the following steps:



1. Remove your organization from channels that you joined. You need to [update the endorsement policy](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-smart-contracts-v2ibp-console-smart-contracts-v2-endorse) of the smart contracts that are deployed on the channel to remove your organization from the policy. If you do not update the endorsement policy, your organization might be required to endorse transactions after you have left the channel, causing transactions to fail.

You can then update to the channel to remove your organization from the list of channel members. Navigate to the Channels tab and click the Settings icon. You can use the Organizations section to remove your organization from the channel. The channel update policy is updated to remove your organization automatically. When you are ready, click Update channel to submit a channel update request. The request starts the [process for collecting the signatures](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-governibp-console-govern-update-channel-signature-collection) that are required to update the channel, depending on your update policy.
Instead, you need to repackage your smart contract and [deploy the smart contract on the network using Fabric v2.x](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-smart-contracts-v2).



 How to upgrade a smart contract 

To upgrade a smart contract, install the updated code by specifying the same smart contract name but by using and a new version number. If you have installed a newer version of a smart contract on any peer in the channel, notice that the original version now has the Upgrade Available button next to it in the Instantiated smart contracts table.

When a new member that will run the smart contract joins the channel, it is mandatory to update the smart contract by installing a new version on all the peers and instantiating it on the channel with a modified endorsement policy that includes the new member.



* Navigate to the Smart contracts tab on the left.
* Scroll down to the Instantiated smart contracts table.
* In the Instantiated smart contracts table, locate the smart contract version and channel that you want to upgrade. It must have the Upgrade Available label next to it.
* Click the overflow menu on the right side of the smart contract row and click Upgrade to perform the following steps:



1. Select the smart contract version that you want to upgrade on the channel from the drop-down list.
2. Update the endorsement policy by adding or removing channel members. You can also click Advanced to paste in a new JSON formatted string, which modifies the existing policy.
3. On the Select peer panel you need to select a peer that can approve the proposal to upgrade the smart contract. Therefore, you need to select a peer from the drop-down list that is from an organization that was a member of the channel before the smart contract was last instantiated on the channel.
4. If you want to associate a private data collection configuration file with the smart contract you can upload the JSON file. Or if you want to update an existing collection configuration, you can upload the JSON file. If the smart contract was previously instantiated with a collection configuration file, you must again upload the previous version or a new version of the collection configuration file during this step.
"renewable": false,
"data": {
"algorithm": "RSA",
"common_name": "example.com",
"created_by": "iam-ServiceId-b7ebcf90-c7a9-495b-8ce8-bbf33cb95ca0",
"creation_date": "2021-06-03T22:41:56Z",
"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/791f5fb10986423e97aa8512f18b7e65:e415e570-f073-423a-abdc-55de9b58f54e:secret:2ca56a3b-a6e8-d2e2-5377-b6559babfac0",
"expiration_date": "2021-06-04T15:25:44Z",
"id": "2ca56a3b-a6e8-d2e2-5377-b6559babfac0",
"intermediate_included": false,
"issuer": "US Texas Austin Example Corp. Example Org example.com",
"key_algorithm": "SHA256-RSA",
"labels": [],
"last_update_date": "2021-06-03T22:41:56Z",
"name": "my-test-imported-certificate",
"private_key_included": false,
"secret_type": "imported_cert",
"serial_number": "fc:22:29:7e:57:25:8a:05",
"state": 1,
"state_description": "Active",
"validity": {
"not_after": "2021-06-04T15:25:44Z",
"not_before": "2021-06-03T15:25:44Z"
},
"creation_date": "2020-12-14T14:48:55Z",
"description": "Read and write to Cloud Object storage buckets.",
"id": "714e070d-8122-6270-198c-fef9166729e3",
"last_update_date": "2020-12-14T14:48:55Z",
"name": "cloud-object-storage-writers",
"type": "application/vnd.ibm.secrets-manager.secret.group+json"
},
{
"creation_date": "2020-12-15T22:08:46Z",
"description": "Extended description for my secret group.",
"id": "2bcaa289-5d38-aa57-910d-970e418ab1b3",
"last_update_date": "2020-12-15T22:08:46Z",
"name": "test-secret-group",
"type": "application/vnd.ibm.secrets-manager.secret.group+json"
}
]
},
"wrap_info": null,
"warnings": null,
"auth": null
}







 Update a secret group 

Updates the details of an existing secret group.



Table 5. Update secret group request parameters

 Request parameters Description 

 name Required. The human-readable alias that you want to assign to the secret group. 
 description An extended description of the secret group. 





 Example request 

curl -X PUT "https://{instance_id}.{region}.secrets-manager.appdomain.cloud/v1/auth/ibmcloud/manage/groups/{group_id}" -H 'Accept: application/json' -H 'X-Vault-Token: {Vault-Token}' -H 'Content-Type: application/json' -d '{
"name": "updated-secret-group-name",
Why am I receiving a blocked PIN on EP11 smart card error? 

You try to use an EP11 smart card for an operation that requires personal identification number (PIN) entry and get an error.

  What’s happening 

You might receive an error message similar to the following one:

Zoom

![Blocked PIN on EP11 smart card](https://cloud.ibm.com/docs-content/v1/content/217f108cc44e2ce15fb692d4b57b4c628464e908/hs-crypto//images/blocked-pin.gif)

Figure 1. Blocked PIN on EP11 smart card

  Why it’s happening 

If an incorrect PIN is entered on an EP11 smart card 3 times, the smart card becomes blocked and can't be used for operations that require PIN entry.

  How to fix it 

Take the following steps to unblock the EP11 smart card:



1.  Start the Smart Card Utility Program.
2.  Select EP11 Smart Card > Unblock EP11 smart card from the pull-down menu.
3.  When prompted, insert the certificate authority smart card for the smart card zone of the EP11 smart card in smart card reader 1 and click OK.
4.  When prompted, enter the first certificate authority PIN on the smart card reader PIN pad.
5.  When prompted, enter the second certificate authority PIN on the smart card reader PIN pad.
6.  When prompted, insert the EP11 smart card to be unblocked in smart card reader 2 and click OK.
"crn": "crn:v1:bluemix:public:kms:us-south:a/ea998d3389c3473aa0987652b46fb146:a192d603-0b8d-452f-aac3-f9e1f95e7411:policy:06a40fd6-6fd7-460a-87d7-8388fc1be057",
"lastUpdateDate": "2020-06-18T20:35:41Z",
"updatedBy": "user id ...<redacted>...",
"rotation": {
"interval_month": 2
}
}

 list the policies
$ ibmcloud kp key policies $KEY_ID --output json

[
{
"createdBy": "user id ...<redacted>...",
"creationDate": "2020-06-18T20:35:41Z",
"crn": "crn:v1:bluemix:public:kms:us-south:a/ea998d3389c3473aa0987652b46fb146:a192d603-0b8d-452f-aac3-f9e1f95e7411:policy:06a40fd6-6fd7-460a-87d7-8388fc1be057",
"lastUpdateDate": "2020-06-18T20:35:41Z",
"updatedBy": "user id ...<redacted>...",
"rotation": { "interval_month": 2
}
}
]





 Required parameters 



* KEY_ID_OR_ALIAS

The v4 UUID or alias of the key that you want to query.
If you omit any required fields, the rule overwrites those missing fields as empty, and the rule might fail because some of those fields are required, regardless of whether they are changing the rule.

Updating requires the RULE-ID, not the rule name. Use the following command to list your rules and retrieve the relevant RULE-ID:

ibmcloud cbr rules

Delete a rule by using a command like:

ibmcloud cbr rule-delete <RULE-ID>

Use ibmcloud cbr <command> — help for a full list of options and parameters. For example, ibmcloud cbr rule-create — help outputs parameters for rule creation.





 Creating rules in Terraform 

To create rules using Terraform, see [IBM Cloud Provider](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs) in the [Terraform Registry](https://registry.terraform.io/).

To create a rule, you need the appropriate Cloud Databases service_name:



* databases-for-etcd
* databases-for-elasticsearch
* databases-for-mongodb
* databases-for-postgresql
* databases-for-redis
* messages-for-rabbitmq
* databases-for-cassandra
* databases-for-enterprisedb
* database-for-mysql



The ibm_cbr_rule provides a resource for cbr_rule and allows a cbr_rule to be created, updated, and deleted.

Create a rule by using a command like:

resource "ibm_cbr_rule" "cbr_rule" {
contexts {
attributes {
name = "networkZoneId"
value = "559052eb8f43302824e7ae490c0281eb"
}
attributes {
name = "endpointType"
value = "private"
}
}
description = "this is an example of a rule with one context one zone"
enforcement_mode = "enabled"
operations {
api_types {
This retrieval gives you a current version of the document that you store, and a list of all the other conflicting documents that must also be retrieved, for example ...rev=2-61ae00e029d4f5edd2981841243ded13 and ...rev=1-7438df87b632b312c53a08361a7c3299. Each of these other conflicting versions is also retrieved and stored, for example:

https://$ACCOUNT.cloudant.com/products/$_ID?rev=2-61ae00e029d4f5edd2981841243ded13https://$ACCOUNT.cloudant.com/products/$_ID?rev=1-7438df87b632b312c53a08361a7c3299

Once you have all of the conflicting revisions of a document available, you can resolve the conflicts.

In an earlier scenario, the differences between the versions of the document were for different fields within the document, making it easier to merge them.

More complicated conflicts are likely to require correspondingly more analysis. To help, you might choose from various conflict resolution strategies, such as:



* Time based - uses a simple test of the first or most recent edit.
* User assessment - the conflicts are reported to users, who then decide on the best resolution.
* Sophisticated merging algorithms - often used with [version control systems](https://en.wikipedia.org/wiki/Merge_%28version_control%29). An example is the [3-way merge](https://en.wikipedia.org/wiki/Merge_%28version_control%29Three-way_merge).



For a practical example of how to implement these changes, see [this project with sample code](https://github.com/glynnbird/deconflict).





 Upload the new revision 

See the following final revisions after you resolve and merge changes from the previous conflicting revisions:

{
"_id": "74b2be56045bed0c8c9d24b939000dbe",
apiKey, response, err := iamIdentityService.UpdateAPIKey(updateAPIKeyOptions)
if err != nil {
panic(err)
}
b, _ := json.MarshalIndent(apiKey, "", " ")
fmt.Println(string(b))

const params = {
id: apikeyId,
ifMatch: apikeyEtag,
description: 'This is an updated description',
};

iamIdentityService.updateApiKey(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err);
});





 Locking and unlocking an API key for a service ID by using the API 

For API keys that represent the identity of the service ID, you can prevent the API key from being deleted by locking it.



 Locking an API key 

To lock an API key for a service ID by using the API, call the [IAM Identity Service API](https://cloud.ibm.com/apidocs/iam-identity-token-api?code=golock-api-key) as shown in the following example:



* Curl
* Java
* Python
* Go
* Node



curl -X POST 'https://iam.cloud.ibm.com/v1/apikeys/APIKEY_UNIQUE_ID/lock' -H 'Authorization: Bearer TOKEN' -H 'Content-Type: application/json'

LockApiKeyOptions lockApiKeyOptions = new LockApiKeyOptions.Builder()
.id(apikeyId)
.build();

service.lockApiKey(lockApiKeyOptions).execute();

response = iam_identity_service.lock_api_key(id=apikey_id)

print(response)
When you have such a view, you can use it to find and resolve conflicts as needed. Alternatively, you might query the view after each replication to identify and resolve conflicts immediately.





 How to resolve conflicts 

After you find a conflict, you can resolve it by following the four steps that are described next.



* Get
* Merge
* Upload
* Delete



See the following example document of the first version:

{
"_id": "74b2be56045bed0c8c9d24b939000dbe",
"_rev": "1-7438df87b632b312c53a08361a7c3299",
"name": "Samsung Galaxy S4",
"description": "",
"price": 650
}

Let's consider a scenario for this example. Suppose you have a database of products for an online shop. The first version of a document might look like the example provided.

See the following second version (first revision) of the document that adds a description:

{
"_id": "74b2be56045bed0c8c9d24b939000dbe",
"_rev": "2-61ae00e029d4f5edd2981841243ded13",
"name": "Samsung Galaxy S4",
"description": "Latest smartphone from Samsung",
"price": 650
}

The document doesn't have a description yet, so someone might add one.

See the following alternative second version that introduces a price reduction data change to the first version of the document:

{
"_id": "74b2be56045bed0c8c9d24b939000dbe",
"_rev": "2-f796915a291b37254f6df8f6f3389121",
"name": "Samsung Galaxy S4",
"description": "",
"price": 600
}
In the drop-down box for each certificate type, select Re-enroll certificate if the certificate has not expired, or Enroll certificate if it has already expired.
5. When you click Update certificates, the ordering node is restarted. Verify renewal is successful by clicking the certificate refresh button next to the Settings icon and examining the updated enrollment and TLS certificate expiration dates. Notice that the ordering node TLS certificate expiration date is in 15 years, so that renewal of this TLS certificate is not required again next year. However, the enrollment certificate expires again in one year, so you will need to renew it again before that date.
6. If you only updated the ordering node enrollment certificate then you are done. But as mentioned earlier, if you updated the ordering node TLS certificate, additional steps are required to update the consenter set on the ordering service system and application channels with the new TLS certificate.



Update the consenter set on the ordering service system channel (TLS certificate renewal only)

When you update the TLS certificate, you also need to update the consenter set on the ordering service system channel. This action ensures that any new application channels which include this ordering node as a consenter will use the updated TLS certificate.

In order to update the ordering service, you must have the ordering service organization admin identity in your wallet.



1. Go back to the Ordering service page and scroll down to the Ordering service consenters table.
2. Click the action menu ![action menu](https://cloud.ibm.com/docs-content/v1/content/icons/overflow-menu.svg) next to the URL, and click Update orderer certificates.
3. After you copy and paste the name of the ordering service consenter set, displayed at the top of the side panel, and click Update consenter, the base-64 encoded TLS certificate is added to the consenter set of the ordering service system channel.



Update the consenter set on the application channel (TLS certificate renewal only)

Next we have to update the TLS certificate for this ordering node on all application channels that include this ordering node as a consenter.
Insert the smart card to be initialized into a smart card reader 1, and click OK.

If you receive a message similar to No smart card inserted, try the following solutions:



* Insert the smart card into another smart card reader. The smart card reader that you picked might not be smart card reader 1.
* Reinsert the smart card into the same smart card reader. The smart card reader might not be reading the smart card properly.



5. Enter a six-digit personal identification number (PIN) twice on the smart card reader PIN pad as the first certificate authority card PIN.

Enter the PIN twice in 20 seconds. Otherwise, the session is expired and you need to reenter the PIN.
6. Enter a six-digit PIN twice on the smart card reader PIN pad as the second certificate authority card PIN. You need to enter both PINs later when you use the certificate authority smart card.

Enter the PIN twice in 20 seconds. Otherwise, the session is expired and you need to reenter the PIN.
7. Enter a description for the smart card zone that holds the EP11 smart cards.
8. Enter a description for the certificate authority smart card.



The certificate authority is created.

It is suggested to create a backup copy of your certificate authority smart card. You can create a backup copy by clicking CA Smart Card > Backup CA smart card.





 Initializing the EP11 smart card 

To create and initialize an EP11 smart card, follow these steps:



1. Select EP11 Smart Card > Initialize and enroll EP11 smart card from the menu.
2. Insert the smart card to be initialized as the EP11 smart card in smart card reader 2 and click OK.
3. Select EP11 Smart Card > Personalize EP11 smart card from the menu bar.
4. Enter a six-digit PIN twice on the smart card reader PIN pad. You need to enter this PIN later when you use the EP11 smart card.
5. Enter a description for the EP11 smart card.
6. If you have more than one EP11 smart card, repeat step 1 to step 5 to initialize other EP11 smart cards.
"lastUpdateDate": "2020-05-05T19:58:24Z",
"lastRotateDate": "2020-05-05T19:58:24Z",
"keyVersion": {
"id": "85b65b20-4165-4da3-8ba9-880e72390461",
"creationDate": "2020-05-05T19:58:24Z"
},
"extractable": false,
"state": 1,
"crn": "crn:v1:bluemix:public:kms:us-south:a/ea998d3389c3473aa0987652b46fb146:390086ac-76fa-4094-8cf3-c0829bd69526:key:8635b804-9966-4918-a16b-d561fdbf181f"
}



 Key Description 

 id This is the KEY_ID, it is unique and is used whenever the CLI specifies a KEY_ID 
 name The name provided when the key was created 
 type Used by the API to set the content-type in a REST call 
 algorithmType Algorithm types are advanced encryption standard (AES) or cipher block chaining (CBC) 
 createdBy The user id that created the key 
 creationDate Date and time the key was created 
 lastUpdateDate Date and time the key was last updated 
 lastRotateDate Date and time the key was last rotated; this entry only exists if the key has been rotated 
 keyVersion / id This identifies the latest version of the root key 
 keyVersion / creationDate Date and time the key material was last updated 
 extractable A boolean that determines whether the key material can leave the service. If set to false, Key Protect designates the key as a nonextractable root key used for wrap and unwrap actions. If set to true, Key Protect designates the key as a standard key that you can store in your apps and services. Once set to false it cannot be changed to true.
3. In the side panel, click Edit configuration JSON (Advanced)
4. Under Configuration updates paste in the following snippet:

{
"General": {
"Authentication": {
"NoExpirationChecks": true
}
}
}
5. Click Update ordering node.
6. Repeat these steps for each ordering node in the ordering service.



Now you are able to update the expired certificates in the channel, see steps [4](https://cloud.ibm.com/docs/blockchain?topic=blockchain-cert-mgmtcert-mgmt-manual-update-channel-peer) - [7](https://cloud.ibm.com/docs/blockchain?topic=blockchain-cert-mgmtcert-mgmt-manual-update-channel) for details. When you are finished, you need to remove the override by using the same process but this time setting the override snippet to:


{
"General": {
"Authentication": {
"NoExpirationChecks": false
}
}
}










 Using the command line to view certificate expiration 

You can also use the command line to check your certificates expiration date. If your certificate was not generated by the console, for example it was generated by using the Fabric CA client or Fabric SDKs, you need to convert certificates that are in base64 format into PEM format by running the following command on your local system:

export FLAG=$(if [ "$(uname -s)" == "Linux" ]; then echo "-w 0"; else echo "-b 0"; fi)
echo <base64_string> | base64 --decode $FLAG > <key>.pem

Run the following command to display the PEM encoded certificate in a human-readable form:

openssl x509 -in <certificate .pem file> -text

The certificate looks similar to the following example:

Certificate:
Data:
Version: 3 (0x2)
Serial Number:
Updating database credentials 

To update the database credentials, use one of the following methods:



*  Updating the database credentials in list view





1.  In Databases tab, click the overflow menu and then click Update credentials.
2.  In the Update credentials window, enter your database username and your database password.
3.  Click Update.





*  Updating the database credentials in topology view





1.  Hover over the database for which you want to update the credentials.
2.  Click the Update credentials icon.
3.  In the Update credentials window, enter your database username and your database password.
4.  Click Update.
"key_algorithm" : "RSA2048",
"serial_number" : "d9:be:fe:35:ba:09:42:b5",
"certificate_authority" : "test-intermediate-CA",
"certificate_template" : "test-certificate-template",
"issuer" : "example.com",
"common_name" : "localhost",
"downloaded" : true,
"rotation" : {
"auto_rotate" : true,
"interval" : 1,
"unit" : "month"
},
"validity" : {
"not_after" : "2022-03-24T05:06:15Z",
"not_before" : "2022-03-07T13:05:46Z"
},
"versions_total" : 2,
"versions" : {
"created_by" : "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
"creation_date" : "2022-03-06T09:44:52Z",
"id" : "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
"state" : 3,
"state_description" : "Deactivated",
"revocation_time" : 1647425316,
"revocation_time_rfc3339" : "2022-03-16T10:08:36Z",
"payload_available" : true,
"downloaded" : true,
"serial_number" : "d9:be:fe:35:ba:09:42:b5",
"expiration_date" : "2022-03-24T05:06:15Z",
"version_custom_metadata" : {
"custom_version_key" : "custom_version_value"
},
"validity" : {