User Cipher Uses

A UserCipherUse is a way to see the exact set of encryption ciphers and protocols used by a given user. This is most often used to support migrations from one TLS version to the next. You can query each user and determine who is still using legacy ciphers.

List User Cipher Uses

SDK Method

usercipheruse.List()

Return Object

[]*UserCipherUse

Authorization Requirement

Not available to user API keys or sessions from users that are marked as Shared/Bot users.

UserCipherUseListParams Fields

FieldDescription
UserId
int64
User ID. If provided, will return uses for this user.

Additional Arguments

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    user_cipher_use "github.com/Files-com/files-sdk-go/v3/usercipheruse"
)

userCipherUseIterator, err := user_cipher_use.List(files_sdk.UserCipherUseListParams{UserId: 1})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

for userCipherUseIterator.Next() {
    userCipherUse := userCipherUseIterator.userCipherUse()
}
err = userCipherUseIterator.Err()
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

The UserCipherUse Object

Some of the methods above return a UserCipherUse object. The attributes of this object are listed below.

AttributeDescription
Id
int64
UserCipherUse ID
UserId
int64
ID of the user who performed this access
Username
string
Username of the user who performed this access
ProtocolCipher
string
The protocol and cipher employed
CreatedAt
date-time
The earliest recorded use of this combination of interface and protocol and cipher (for this user)
Insecure
boolean
Is this cipher considered insecure?
Interface
string
The interface accessed
Possible values: web, ftp, sftp, dav, desktop, restapi, robot, jsapi, inbound_s3
UpdatedAt
date-time
The most recent use of this combination of interface and protocol and cipher (for this user)