Skip to content
  • Discuss all the things!

    178 667
    178 Topics
    667 Posts
    G
    A Global Property (String, Category internal, Secret: checked) holds a bearer token that two scheduled Cloud Code scripts need in order to call our own backend. Cloud Code cannot read it. The script does: var res = bridge.getGlobalAppServiceProxy().readSelectedProperties(["MY_SECRET_PROPERTY"]); if (!res || res.status !== 200 || !res.data || !res.data["MY_SECRET_PROPERTY"]) { bridge.logError("failed to read MY_SECRET_PROPERTY"); } Running it from the portal returns: { "response": { "logList": [ { "level": "error", "message": "failed to read MY_SECRET_PROPERTY" }, { "level": "error", "message": "skipped POST: bearer token unavailable" } ], "callStats": { "globalApp": { "READ_SELECTED_PROPERTIES": 1 } }, "callCounts": { "total": 4, "api": 2 }, "status": 200 }, "duration": 17 } So the call is made and succeeds — READ_SELECTED_PROPERTIES: 1, status 200, no exception — but the requested key is absent from data. It is silently filtered rather than reported. A non-secret property in the same app is read successfully by the same proxy on every run. The Secret flag is the only difference between the two. Support confirmed this behavior is expected, and I see no Sys-prefixed read method for properties in the docs — only SysCreateProperty* / SysUpdateProperty*. The suggested workaround was to keep the secret in our server environment and read it from there, but Cloud Code runs on brainCloud's infrastructure — a .ccjs script has no access to our environment variables or secrets manager. Global Properties appears to be the only config store Cloud Code can read, so flagging one Secret makes it unreachable by the layer that needs it. Questions Is there any supported way to read a Secret Global Property from Cloud Code? If not: what is the recommended pattern for a secret that Cloud Code itself consumes, rather than one our backend consumes? Unchecking Secret would expose the token to any authenticated client via GlobalApp.ReadProperties(), which we can't accept in production. Thank you.
  • Suggestions for improvements, new features, etc.

    47 160
    47 Topics
    160 Posts
    Paul WinterhalderP
    Hi @noah , brainCloud 6.0.1, which will be released next week, adds new data stream events for virtual item purchases. We'll keep #2 and #3 in mind as we continue to evolve things going forward. Thanks for pointing out MongoDB CDC - I wasn't familiar with that capability before. We'll take a harder look at it. Cheers! Paul.
  • Questions specific to particular APIs, libraries, etc.

    67 273
    67 Topics
    273 Posts
    Michael CostaM
    Thanks for letting us know and your own solutions! We'll see if we can patch this into the JsonFx library we're using for future versions of brainCloud to avoid these edge cases.
  • General cloud code discussions...

    35 149
    35 Topics
    149 Posts
    J
    Q1: The removed player is completely excluded from reward calculation, so if the deletion happens before the job runs, that player is never iterated over and receives no rank or rewards. Q2: Yes, the modified score will be used. The job always reads live state. Note that whether the score actually gets modified depends on the leaderboard type (e.g., for the LOW_VALUE type, only updates if the new score is less than the existing) Q3: No backfilling, the next joiner goes to the latest instance, not the freed spot in ^2. No loop over earlier instances (^1, ^2) ever happens. The next joiner goes to ^3 (or ^4 if ^3 is full). The freed spot in ^2 stays empty permanently.
  • brainCloud's online learning tutorials and examples.

    3 3
    3 Topics
    3 Posts
    Hoar JoanneH
    brainCloud developers have just release several playable builds of our famous examples! See our cool features in action. Find them at https://getbraincloud.com/demos for Windows, Mac, online and mobile.
brainCloud 6 is alive!

brainCloud 6 features brainBot, our new AI assistant, LiveOps Campaigns, Group Tournaments, i3D Flex Metal Hosting, our new brainCloud MCP, and more!

brainCloud Bootcamp!
brainCloud's new video learning portal is now online! Go check out brainCloud BootCamp!

Need to report a defect?
Use the chat widget from the Design Portal - or send an email to support at getbraincloud.com. Thanks!