Problem/Motivation

The method of providing a PHP array directly for credentials when creating a SearchServiceClient is deprecated:

@type FetchAuthTokenInterface|CredentialsWrapper $credentials
     *           This option should only be used with a pre-constructed
     *           {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that
     *           when one of these objects are provided, any settings in $credentialsConfig will
     *           be ignored.
     *           **Important**: If you are providing a path to a credentials file, or a decoded
     *           credentials file as a PHP array, this usage is now DEPRECATED. Providing an
     *           unvalidated credential configuration to Google APIs can compromise the security
     *           of your systems and data. It is recommended to create the credentials explicitly
     *           ```
     *           use Google\Auth\Credentials\ServiceAccountCredentials;
     *           use Google\Cloud\DiscoveryEngine\V1\SearchServiceClient;
     *           $creds = new ServiceAccountCredentials($scopes, $json);
     *           $options = new SearchServiceClient(['credentials' => $creds]);

Proposed resolution

Update to the new recommended method to provide credentials.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jastraat created an issue. See original summary.

jastraat’s picture

Status: Active » Needs review

timozura made their first commit to this issue’s fork.

  • timozura committed 89d6dcb8 on 1.0.x authored by jastraat
    Issue #3612531: Update to validated credentials when creating...
timozura’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.